php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52742 PHP 5.2.14 messes up SCRIPT_FILENAME
Submitted: 2010-08-30 17:36 UTC Modified: 2016-08-02 18:07 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mfurdyk at takingitglobal dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.14 OS: RHEL
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mfurdyk at takingitglobal dot org
New email:
PHP Version: OS:

 

 [2010-08-30 17:36 UTC] mfurdyk at takingitglobal dot org
Description:
------------
After upgrading from 5.2.6 to 5.2.14, our SCRIPT_FILENAME and SCRIPT_NAME seem 
to be getting broken. Running as FastCGI:

From phpinfo():

5.2.14

_SERVER["SCRIPT_FILENAME"]	/dev/null/phpinfo.html
_SERVER["SCRIPT_NAME"]	/fcgi-bin/php

5.2.6 (still running on 2/3 servers)

_SERVER["SCRIPT_FILENAME"]	/sites/takingitglobal.admin.v5/phpinfo.html
_SERVER["SCRIPT_NAME"]	/phpinfo.html

Compile string:

'./configure' '--with-mysql=/usr' '--with-libdir=lib64' '--with-zlib' '--with-
gd' '--enable-inline-optimization' '--with-curl' '--disable-debug' '--with-
mcrypt=/usr/local/src/libmcrypt-2.5.7' '--with-mhash' '--enable-ftp' '--enable-
zend-multibyte' '--enable-fastcgi' '--enable-mbstring' '--with-freetype-
dir=/usr' '--with-gmp' '--with-openssl' '--with-jpeg-dir=/opt' '--with-png-
dir=/opt' '--enable-sockets'

Expected result:
----------------
See what 5.2.6 returns



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-31 00:25 UTC] srinatar@php.net
-Status: Open +Status: Feedback
 [2010-08-31 00:25 UTC] srinatar@php.net
i believe, you need to include --enable-force-cgi-redirect configuration flag while compiling with fastcgi support to overcome this.
 [2010-08-31 00:45 UTC] mfurdyk at takingitglobal dot org
-Status: Feedback +Status: Open
 [2010-08-31 00:45 UTC] mfurdyk at takingitglobal dot org
Recompiled:

'./configure' '--with-mysql=/usr/include/mysql' '--with-zlib' '--with-gd' '--
with-jpeg-dir' '--with-png-dir' '--enable-inline-optimization' '--with-curl' '--
disable-debug' '--with-mcrypt=/usr/local/src/libmcrypt-2.5.7' '--with-mhash' '--
enable-ftp' '--enable-zend-multibyte' '--enable-fastcgi' '--enable-mbstring' '--
with-freetype-dir=/usr' '--with-gmp' '--with-openssl' '--enable-sockets' '--
with-libdir=lib64' '--enable-force-cgi-redirect'

Result is the same:

_SERVER["SCRIPT_FILENAME"]	/dev/null/phpinfo.html
_SERVER["SCRIPT_NAME"]	/fcgi-bin/php
 [2010-08-31 01:51 UTC] mfurdyk at takingitglobal dot org
FYI, I also noticed that make test doesn't work, in case that's relevant...

[root@tigweb3 php-5.2.14]# make test

Build complete.
Don't forget to run 'make test'.

make: [test] Error 255 (ignored)
 [2010-08-31 20:28 UTC] srinatar@php.net
how is your web server configured ? and what web server r u using ?
 [2010-08-31 20:48 UTC] mfurdyk at takingitglobal dot org
Using Zeus Web Server, connecting to PHP over FastCGI socket. 5.2.6 is running the 
same way on the other two servers (sharing ZWS config)
 [2016-08-02 18:07 UTC] kalle@php.net
-Status: Open +Status: Not a bug
 [2016-08-02 18:07 UTC] kalle@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC