PHP :: Bug #46366 :: bad cwd with
| Bug #46366 | bad cwd with / as pathinfo | ||||
|---|---|---|---|---|---|
| Submitted: | 2008-10-22 16:07 UTC | Modified: | 2008-11-28 11:57 UTC | ||
| From: | courtois at nouvo dot com | Assigned: | dmitry (profile) | ||
| Status: | Closed | Package: | CGI/CLI related | ||
| PHP Version: | 5.2CVS-2008-10-24 | OS: | windows XP | ||
| Private report: | No | CVE-ID: | None | ||
[2008-10-22 16:07 UTC] courtois at nouvo dot com
Description: ------------ when / is passed as pathinfo to a script current working directory is set to the php-cgi.exe directory instead of script directory http://localhost/foo/bar.php gives: cwd===>C:\Program Files\Apache Group\Apache2\htdocs\foo<=== which is ok http://localhost/foo/bar.php/x gives: cwd===>C:\Program Files\Apache Group\Apache2\htdocs\foo<=== which is ok http://localhost/foo/bar.php/ gives: cwd===>C:\Program Files\PHP<=== which is obviously not ok, therefore all includes in scripts fail apache 2 config: ScriptAlias /php/ "C:/Program Files/PHP/" Action application/x-httpd-php "/php/php-cgi.exe" php.ini: cgi.fix_pathinfo=1 Reproduce code: --------------- <?php print "cwd===>".getcwd()."<==="; ?>
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-10-25 04:52 UTC] courtois at nouvo dot com
[2008-10-25 09:53 UTC] jani@php.net
[2008-11-28 11:57 UTC] dmitry@php.net