PHP_SELF not set

durist nginx-forum at nginx.us
Sat Sep 12 01:13:17 MSD 2009


vesperto Wrote:

> The latest stable version is 7.6.1, you could try
> compiling from
> source. What's Ubuntu's default fastcgi_params
> file? Here are a few on
> mine:
> 
> fastcgi_param  SCRIPT_NAME       
> $fastcgi_script_name;
> fastcgi_param  DOCUMENT_URI       $document_uri;
> 
> Are those on yours? I've commented out
> fastcgi_param  DOCUMENT_ROOT
> because i define that under each virtual host.
> Your nginx.conf could
> also provide some clues, as well as PHP's error
> log (set php.ini to
> log to a file) and nginx's error.log as well.

Thanks, I do have SCRIPT_NAME defined, and it is getting passed correctly. There seems to be something special about PHP_SELF; it isn't defined in my nginx.conf or in my fastcgi_params, and when I dump $_SERVER from php it's set to a zero-length string. Again, explicitly setting it in nginx.conf or fastcgi_params doesn't do anything.

I can make cacti work by replacing all references to PHP_SELF with REQUEST_URI, but that's not a very maintainable solution.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,6565,6578#msg-6578






More information about the nginx mailing list