apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.86k stars 223 forks source link

an issue on windows #214

Closed dfeverx closed 5 years ago

dfeverx commented 5 years ago

"Unknown location in C:\xampp\htdocs\myapi\vendor\psx\framework\src\Loader\Loader.php on line 104"

chriskapp commented 5 years ago

Hi, which route are you requesting if this error occurs?

dfeverx commented 5 years ago

i try to install fusio on XAMPP(win) first i copy past the fusio in htdocs folder C:\xampp\htdocs\fusio and then create a database named "fusio" in php myadmin then i configure .env like this

        # Fusio
        FUSIO_PROJECT_KEY="42eec18ffdbffc9fda6110dcc705d6ce"
        FUSIO_URL="http://#myip/fusio"
        FUSIO_ENV="dev" # dev or prod
        FUSIO_DB_NAME="fusio"
        FUSIO_DB_USER="root"
        FUSIO_DB_PW=""
        FUSIO_DB_HOST="localhost"

        # Config (resources/config.yaml)
        # Login provider
        PROVIDER_FACEBOOK_SECRET=""
        PROVIDER_GOOGLE_SECRET=""
        PROVIDER_GITHUB_SECRET=""

        # Register captcha
        RECAPTCHA_SECRET=""

then in windows powershell i typed PS C:\xampp\htdocs\fusio> php bin/fusio install afet it complete PS C:\xampp\htdocs\fusio> php bin/fusio adduser Choose the status of the account [0=Consumer, 1=Administrator]: 1 Enter the username: test Enter the email: test@gmail.com Enter the password:123456789 Repeat the password:123456789 Created user test successful PS C:\xampp\htdocs\fusio>

then i got http://localhost/fusio/public/fusio/#!/login i try to login with username test,password 12345689 but it show an Authentication failed message

then try http://localhost/fusio if show all the file in that fusio directory then http://localhost/fusio/public/

at that time it show this json data { "success": false, "title": "PSX\Framework\Loader\InvalidPathException", "message": "Unknown location in C:\xampp\htdocs\fusio\vendor\psx\framework\src\Loader\Loader.php on line 104", "trace": "#0 C:\xampp\htdocs\fusio\vendor\psx\framework\src\Dispatch\Dispatch.php(125): PSX\Framework\Loader\Loader->load(Object(PSX\Http\Request), Object(PSX\Http\Response), Object(Fusio\Impl\Loader\Context))\n#1 C:\xampp\htdocs\fusio\vendor\psx\framework\src\Environment\WebServer\Engine.php(47): PSX\Framework\Dispatch\Dispatch->route(Object(PSX\Http\Request), Object(PSX\Http\Response))\n#2 C:\xampp\htdocs\fusio\vendor\psx\framework\src\Environment\Environment.php(67): PSX\Framework\Environment\WebServer\Engine->serve(Object(PSX\Framework\Dispatch\Dispatch), Object(PSX\Framework\Config\Config))\n#3 C:\xampp\htdocs\fusio\public\index.php(29): PSX\Framework\Environment\Environment->serve()\n#4 {main}", "context": "100 $controller = $this->controllerFactory->getController($context->getSource(), $context);\n101 \n102 $this->execute($controller, $result, $response);\n103 } else {\n104 throw new InvalidPathException('Unknown location', $request);\n<\/b>105 }\n106 }\n107 \n108 \/**\n" }

if i do any thing wrong sorry for that

chriskapp commented 5 years ago

ok, thanks for the detailed report, so in your FUSIO_URL at then .env file you need to configure the following url: http://#myip/fusio/public

If you open then http://#myip/fusio/public you should see the fitting installation successful response.

Normally it is recommended to create a virtual host which points to the public/ folder of Fusio, then the FUSIO_URL contains only the domain name. If you like you can also take a look at the manual: https://fusio.readthedocs.io/en/latest/basic/installation.html#web-server

dfeverx commented 5 years ago

image

thank you sir the issue is solved

dfeverx commented 5 years ago

Thank you very much for looking into this