php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18185 Environment variables unavailable
Submitted: 2002-07-05 11:39 UTC Modified: 2002-07-05 12:04 UTC
From: tim dot bell at btinternet dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.2.1 OS: Windows 2000 Server
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: tim dot bell at btinternet dot com
New email:
PHP Version: OS:

 

 [2002-07-05 11:39 UTC] tim dot bell at btinternet dot com
Environment variables cannot be accessed using $VAR_NAME in this version. getenv("VAR_NAME") & $_SERVER["VAR_NAME"] are ok.

eg:-

print $HTTP_USER_AGENT ;
gives
Notice: Undefined variable: HTTP_USER_AGENT in D:\index.php on line 19.

phpinfo() works ok & shows them. Re-installed 4.0.6 and back to normal. Using IIS 5.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-05 12:04 UTC] sander@php.net
In PHP 4.2.0, the 'register_globals' setting default changed to
be off. See http://www.php.net/release_4_2_0.php for more info.
We are sorry about the inconvenience, but this change was a necessary
part of our efforts to make PHP scripting more secure and portable.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Mar 26 02:01:29 2025 UTC