|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22919 Missing server variables
Submitted: 2003-03-27 03:34 UTC Modified: 2003-04-06 06:59 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: marcus at names dot co dot uk Assigned:
Status: No Feedback Package: CGI/CLI related
PHP Version: 4.3.1 OS: Redhat Linux 7.2
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: marcus at names dot co dot uk
New email:
PHP Version: OS:


 [2003-03-27 03:34 UTC] marcus at names dot co dot uk
When building PHP 4.3.1 as a cgi binary, some of the server variables do not get set correctlt. Most importantly, $PHP_SELF and $SCRIPT_NAME are missing altogether.

Looking at cgi_main.c, it looks as though $PHP_SELF is inherited from $SCRIPT_NAME for the CGI version - so perhaps this is why they are both missing?

I am running under Zeus Web Server 4.2, but the problem is the same when run from the command line.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-27 08:21 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

SCRIPT_NAME variable is not being exported by the command line or Zeus server, hence the lack of these two variables.
 [2003-03-27 08:32 UTC] marcus at names dot co dot uk
Thanks for the speedy reply - but how come it works in PHP 4.2.3? Has PHP changed the way in which these variables are set - ie did php not previously rely on SCRIPT_NAME being passed by the web server?
 [2003-04-06 06:59 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 11:01:27 2024 UTC