php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22531 Undefined variable: _ENV, vanished superglobals
Submitted: 2003-03-04 02:00 UTC Modified: 2003-03-05 16:26 UTC
From: daniel dot gorski at develnet dot org Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5CVS-2003-03-04 (dev) OS: Linux RH6.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot gorski at develnet dot org
New email:
PHP Version: OS:

 

 [2003-03-04 02:00 UTC] daniel dot gorski at develnet dot org
root@warpcore:/src/php5/sapi/cli> ./php -v
PHP 5.0.0-dev (cli) (built: Mar  4 2003 08:43:46)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies

root@warpcore:/src/php5/sapi/cli> ./php -i | head -16
phpinfo()
PHP Version => 5.0.0-dev

System => Linux warpcore 2.2.20 #12 Mon Feb 10 17:14:10 CET 2003 i686
Build Date => Mar  4 2003 08:39:51
Configure Command =>  './configure' '--enable-force-cgi-redirect' '--with-mysql=/usr/local/mysql' '--with-config-file-path=../conf' '--with-zlib'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => ../conf
PHP API => 20020918
PHP Extension => 20020429
Zend Extension => 90021012
Debug Build => no
Thread Safety => disabled
Registered PHP Streams => php, http, ftp, compress.zlib

root@warpcore:/src/php5/sapi/cli> ./php 
<?php
  error_reporting(E_ALL);
  print_r($_ENV);
?>
Notice: Undefined variable:  _ENV in - on line 3

The same goes for $_SERVER (in CGI version). Latest HEAD on RH6.2 Linux.

regards dtg

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-04 07:22 UTC] andrew@php.net
Unable to reproduce on WinXP (latest snap)...

Running via CLI, i get full output from: php -r "print_r($_ENV);" as well as php -r "print_r($_SERVER);"

~ Andrew Heebner
 [2003-03-05 02:31 UTC] daniel dot gorski at develnet dot org
Please try this one:

<?php
  
  error_reporting(E_ALL);
  
  function foo() {
    print_r($_SERVER);
    print_r($_ENV);
  }
  
  foo();
?>

Notice: Undefined variable:  _SERVER in - on line 6
Notice: Undefined variable:  _ENV in - on line 7

Making $_SERVER etc. explicitly "global" would work, but it's not the intension of superglobals. 

BTW: the new ini parameter "register_long_arrays" is set to "On" here
 [2003-03-05 06:38 UTC] sniper@php.net
Report these kind of bugs in the php5-dev/php-dev mailing list. (and PHP 5 is still moving target, reporting any bugs in it before there isn't even pre-alpha-beta release out is not helping.)

 [2003-03-05 16:26 UTC] daniel dot gorski at develnet dot org
Sniper wrote:

>Report these kind of bugs in the php5-dev/php-dev
>mailing list

Well, Sniper, disable the ability to report bugs to the "5CVS-2003-XX-XX" version in the bug tracking system then.

This bug has been apparently fixed [1]

regards dtg

[1] http://zend.com/lists/engine2/200303/msg00064.html
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Nov 30 07:00:01 2025 UTC