Submitted by gnilebein on Thu, 11/17/2011 - 11:19
I think there is an issue with PHP5.3 in cgi mode. I tried this under Debian Lenny and Ubuntu Lucid:
- Fresh install of Ubuntu / Debian with Virtualmin PHP Running in cgi mode
- php File with print_r( $PHP_SELF) and print_r($_SERVER['PHP_SELF']);
- The output is: /cgi-bin/php5.cgi but should be test.php
Maybe there is an issue with your php5.cgi script under cgi-bin? Please take a look at it.
BTW: I found this issue while debugging wordpress, which is not running under PHP5.3 in cgi mode. in fcgi mode it works fine.
Submitted by andreychek on Thu, 11/17/2011 - 12:02 Comment #1
Howdy -- that's correct, that's the normal PHP behavior when running in CGI mode. There's a lot of other folks unhappy about that behavior in PHP when Googling about that issue :-)
You should be able to work around that issue by editing your Virtual Server's php.ini file in $HOME/etc/php.ini, and to set this parameter:
With that option set on a Debian 6 test system I have here, the PHP_SELF parameter is set as you're looking for.