|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Submitted: 2009-03-11 16:18 UTC Modified: 2009-03-16 23:55 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mfernandes at infolink dot com dot br Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.9 OS: Linux 32 bit
Private report: No CVE-ID: None
 [2009-03-11 16:18 UTC] mfernandes at infolink dot com dot br
Made the migration from PHP-5.2.8 for PHP-5.2.9 and my clients have had difficulties in some of its applications, using variables as superglobals SCRIPT_NAME and PHP_SELF.

My platform PHP runs as CGI, and the mapping of the path of the PHP CGI mode is done via a ScriptAlias in Apache in order to "hide" the real path of the users.

See my example of the PHP configuration to call the Apache:

ScriptAlias /13eghrtTYU89aD/ "/home/bin/lsd/php-5.2.9-1/bin/"
Action PHP3-script/13eghrtTYU89aD/php

After the migration from PHP-5.2.8 for PHP-5.2.9 the contents of variables SCRIPT_NAME and PHP_SELF were modified in its output, as in the example:

PHP-5.2.8: /info.php
PHP-5.2.9: /13eghrtTYU89aD/info.php

Through the php.ini directive "cgi.fix_pathinfo = Off", could circumvent the problem, but this leads me other problems, such as customers who make calls in the style "/index.php/user/index/search".

I believe that the changes made between versions 5.2.8 and PHP-PHP-5.2.9 caused this behavior.

I would remember only that the return to the version of PHP 5.2.8, the problem no longer occurs.

My best regards.

Reproduce code:
<? echo $_SERVER['SCRIPT_NAME']; ?>
<? echo $_SERVER['PHP_SELF']; ?>

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-16 23:55 UTC]
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #47042 for more info. 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC