-
Couldn't load subscription status.
- Fork 8k
Closed
Description
Description
- Use the built-in server
- Place a
phpinfo()script with the following code in a file calledindex.phpin the server's root:
<?php phpinfo();- Try requesting a URL with
PATH_INFOdata:
http://localhost:8081/anything/works/here
You should see a valid phpinfo page with theanything/works/hereprovided as path info data, and theindex.phpwrapper appropriately identified as the handling script:

- Now, edit the URL to add a
., e.g.:
http://localhost:8081/anything/works/he.re
Loading this will give a 404 page:

URLs with a . in the PATH_INFO data should work equally well as those without.
The documentation does not mention this quirk:

...but the code appears to look specifically for a .:
php-src/sapi/cli/php_cli_server.c
Line 1458 in a66c926
| if (*q-- == '.') { |
PHP Version
PHP 8.2.12
Operating System
Ubuntu 20.04
andypost and Amunak