php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6135 mod_php4 HTTP_SERVER_VARS broken (patch included)
Submitted: 2000-08-12 22:24 UTC Modified: 2000-08-12 23:03 UTC
From: eric dot kidd at pobox dot com Assigned:
Status: Closed Package: Other
PHP Version: 4.0.1pl2 OS: RedHat Linux 6.2
Private report: No CVE-ID: None
 [2000-08-12 22:24 UTC] eric dot kidd at pobox dot com
mod_php4 sets up HTTP_SERVER_VARS incorrectly. This problem occurs when:

* You're using mod_php4 with Apache
* register_globals is off.

What happens:

* You can still access PHP_SELF and PATH_TRANSLATED.
* All other members of HTTP_SERVER_VARS are missing.

To fix this bug, apply the following patch to PHP 4.0.1pl2:

--- sapi/apache/mod_php4.c-old	Sat Aug 12 21:58:57 2000
+++ sapi/apache/mod_php4.c	Sat Aug 12 21:59:20 2000
@@ -255,7 +255,7 @@
 		} else {
 			val = empty_string;
 		}
-		php_register_variable(elts[i].key, val, NULL ELS_CC PLS_CC);
+		php_register_variable(elts[i].key, val, track_vars_array ELS_CC PLS_CC);
 	}
 
 	/* insert special variables */

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-12 23:03 UTC] zeev@php.net
Already fixed in the CVS.  Thanks!
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Feb 03 11:03:46 2023 UTC