|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-08-16 13:39 UTC] six at aegis-corp dot org
With the CGI version of PHP, $PHP_SELF is always set to the value of HTTP_SERVER_VARS[PATH_INFO] if it is available. But the PATH_INFO server var does not at all designate the running script, which is by the SCRIPT_NAME var. This causes scripts using path_info (URLs like http://www.example.com/script/arg1/arg2/argX) to fail when using self refering links on a server using the CGI version on PHP. This bus does not exists with the apache module. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 14:00:01 2025 UTC |
I checked and this bug revives #14307 which died some time ago unfixed. The code in question is in sapi/cgi/cgi_main.c : SG(request_info).request_uri = getenv("PATH_INFO"); if (!SG(request_info).request_uri) { SG(request_info).request_uri = getenv("SCRIPT_NAME"); } Should be more like : SG(request_info).request_uri = getenv("SCRIPT_NAME"); strcat(SG(request_info).request_uri, getenv("PATH_INFO"));