php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2609 PATH_TRANSLATED environment variable being ignored
Submitted: 1999-10-26 15:13 UTC Modified: 1999-10-27 16:43 UTC
From: jmidgley at zeustechnology dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 2 OS: Linux 2.2.13, glibc2.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jmidgley at zeustechnology dot com
New email:
PHP Version: OS:

 

 [1999-10-26 15:13 UTC] jmidgley at zeustechnology dot com
When php3 was run as a CGI binary, it used to read the CGI env. variable PATH_TRANSLATED to discover where the script was that it was supposed to be executing.

For some reason, php4 no longer does this, meaning that the CGI binary doesn't work- (with webservers such as Zeus, for example).  The following diff fixes the problem.  No claims as to the elegance or correctness of this solution are made, but it would be much appreciated if this could be fixed in the next release.

 diff -u php-4.0b2/request_info.c php-4.0b2-damianed/request_info.c
--- php-4.0b2/request_info.c    Fri Jul 16 14:12:42 1999
+++ php-4.0b2-damianed/request_info.c   Tue Oct 26 20:32:43 1999
@@ -60,6 +60,8 @@
        } else {
                SG(request_info).path_translated = NULL;
        }
+#else
+       SG(request_info).path_translated = getenv("PATH_TRANSLATED");
 #endif
        return SUCCESS;
 }


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-27 16:43 UTC] sas at cvs dot php dot net
Thanks for the report. This has been fixed for beta 3.

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Mon Oct 12 10:00:01 2026 UTC