php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5432 Apache server variables do not get registered
Submitted: 2000-07-07 12:45 UTC Modified: 2000-07-07 19:39 UTC
From: jeroen at darius dot demon dot nl Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Latest CVS (07/07/2000) OS: Windows 2000
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: jeroen at darius dot demon dot nl
New email:
PHP Version: OS:

 

 [2000-07-07 12:45 UTC] jeroen at darius dot demon dot nl
The sapi_apache_register_server_variables function in sapi/apache/mod_php4.c does not add the apache server variables (like SERVER_NAME, SERVER_ADMIN, SERVER_PORT, REQUEST_METHOD).

The following patch fixes this, but I'm not sure if this is what we really want, because now also COMSPEC, PATH, etc are also present.

diff -u ./mod_php4.c ..\..\..\php4-200007060045\sapi\apache/mod_php4.c
--- ./mod_php4.c	Thu Jul 06 10:24:56 2000
+++ ..\..\..\php4-200007060045\sapi\apache/mod_php4.c	Wed Jul 05 18:45:14 2000
@@ -255,7 +255,7 @@
 		} else {
 			val = empty_string;
 		}
-		php_register_variable(elts[i].key, val, track_vars_array ELS_CC PLS_CC);
+		php_register_variable(elts[i].key, val, NULL ELS_CC PLS_CC);
 	}
 
 	/* insert special variables */


Best regards,

Jeroen Janssen

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-07 14:36 UTC] stas at cvs dot php dot net
Actually, seems the patch should be the reverse?
 [2000-07-07 14:55 UTC] jeroen at darius dot demon dot nl
ah, oops... I "switched" new/old file when diffing, sorry :)
 [2000-07-07 19:39 UTC] stas at cvs dot php dot net
Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 14:01:27 2025 UTC