Incorrect $request_filename in 1.0.5?

Igor Sysoev igor at sysoev.ru
Sun Aug 28 17:48:15 UTC 2011


On Sun, Aug 28, 2011 at 10:18:51AM -0400, Roger Smith wrote:
> Hi, thanks for the reply. Ok, so I've changed to /index.php, but
> $_SERVER['SCRIPT_FILENAME'] is now /var/www/testsite//index.php (double
> slash before index.php)
> 
> while the nginx $request_filename is correct. Surely that isn't right?

You probably have the directive

    fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;

It should be changed to

    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;


-- 
Igor Sysoev



More information about the nginx mailing list