php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29971 variables_order behaviour
Submitted: 2004-09-03 16:01 UTC Modified: 2005-05-25 19:43 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: betz@php.net Assigned: zeev (profile)
Status: Closed Package: *General Issues
PHP Version: 5CVS-2005-04-03 OS: *
Private report: No CVE-ID: None
 [2004-09-03 16:01 UTC] betz@php.net
Description:
------------
Hi,
regardless of the setting for variables_order, all types of variables (EGPCS) are registered by php. This is true for the apache, cli and cgi SAPI.
For sure I doublechecked using the right ini-file.

If this is desired behaviour at least the docs are confusing:
http://www.php.net/manual/en/ini.sect.data-handling.php#ini.variables-order
as they imply, that variables which are not set in variables_order are ignored by php.


Reproduce code:
---------------
Short repro-skript for cli:
./php -n -d variables_order="GPC" -r 'var_dump($_ENV, $_SERVER);var_dump(ini_get("variables_order"));'

./php -v:
PHP 5.0.1 (cli) (built: Aug 31 2004 00:23:09)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.1, Copyright (c) 1998-2004 Zend Technologies



Expected result:
----------------
array(0) {
}
array(0) {
}
string(3) "GPC"


Actual result:
--------------
$_ENV and $_SERVER are filled

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-04 14:00 UTC] tony2001@php.net
Additionally there are some leaks reported:
/home/dev/php-src/main/php_variables.c(659) :  Freeing 0x0827550C (32 bytes), script=-
/home/dev/php-src/Zend/zend_hash.c(169) : Actual location (location was relayed)
Last leak repeated 1 time
/home/dev/php-src/main/php_variables.c(658) :  Freeing 0x0827546C (16 bytes), script=-

This happens only if E or S is absent from variables_order.
 [2005-03-07 21:05 UTC] sniper@php.net
I think this has something to do with the JIT initialization..Zeev, can you check this please?

 [2005-05-25 19:43 UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC