Closed weierophinney closed 4 years ago
One note: this works fine under the docker-compose setup, or when running PHP via php-fpm or mod_php. It is limited specifically to the built-in PHP webserver.
built-in webserver does not act as described in documentation: it does not try to find index.php or index.html in parent directory if subdirectory actually exists on the FS.
It does work when route script is specified:
php -S 0.0.0.0:8080 -t public public/index.php
But that brings back the issue of inconsistency we encountered before where it couldn't find router script on different versions and/or OS
The instructions now point out that the server should be created using:
$ php -S 0.0.0.0:8080 -t public public/index.php
The last argument is a fallback to use if no file can be matched. When this argument is present, it works correctly.
Bug Report
Summary
When running the API Tools using the PHP built-in webserver per the instructions, the initial page redirects to
/api-tools/ui
, which presents a 404 from the built-in webserver itself.Calls to API endpoints such as
/api-tools/api/dashboard
fail similarly.Current behavior
See Summary.
How to reproduce
composer create-project laminas-api-tools/api-tools-skeleton
LaminasDeveloperTools
fromconfig/development.config.php.dist
php -S 0:8080 -t public
localhost:8080
and/orlocalhost:8080/api-tools/ui
and/orlocalhost:8080/api-tools/api/dashboard
.Expected behavior
In a browser, the Admin UI should display.
When accessing an API endpoint, results should be presented.