Re: empty variables_order, was PHP CLI environment variables

From: Date: Wed, 06 Nov 2002 13:13:23 +0000
Subject: Re: empty variables_order, was PHP CLI environment variables
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-90555@lists.php.net to get a copy of this message
Interesting, i have $_ENV when variables_order is empty in ini using cli. But i still do get memory leaks. However i do get the expected result when i use -d option for the call. I also tested all the possible version to get this failed. [marcus@zaphod php4-HEAD]$ php -d "variables_order=\"\"" -r 'var_dump($_ENV);' array(0) { } [marcus@zaphod php4-HEAD]$ php -d "variables_order=\"\"" -r 'var_dump(void);' Command line code(1) : Notice - Use of undefined constant void - assumed 'void' string(4) "void" [marcus@zaphod php4-HEAD]$ php -d "variables_order=\"\"" -r 'var_dump(null);' NULL [marcus@zaphod php4-HEAD]$ php -d "variables_order=\"\"" -r 'var_dump($x);' Command line code(1) : Notice - Undefined variable: x NULL [marcus@zaphod php4-HEAD]$ php -d "variables_order=\"\"" -r 'var_dump();' Command line code(1) : Warning - Wrong parameter count for var_dump() [marcus@zaphod php4-HEAD]$ php -d "variables_order=" -r 'var_dump($_ENV);' array(39) { ["PWD"]=> (............................) } /usr/src/php4-HEAD/main/main.c(1434) : Freeing 0x4093CB34 (16 bytes), script=- Last leak repeated 1 time /usr/src/php4-HEAD/Zend/zend_hash.c(260) : Freeing 0x40939C7C (40 bytes), script=- Last leak repeated 45 times /usr/src/php4-HEAD/Zend/zend_hash.c(404) : Freeing 0x40939AC8 (35 bytes), script=- /usr/src/php4-HEAD/main/main.c(1397) : Freeing 0x40939A8C (2 bytes), script=- /usr/src/php4-HEAD/main/main.c(1394) : Freeing 0x40939A48 (16 bytes), script=- /usr/src/php4-HEAD/Zend/zend_API.c(575) : Freeing 0x409399F4 (32 bytes), script=- /usr/src/php4-HEAD/Zend/zend_hash.c(175) : Actual location (location was relayed) /usr/src/php4-HEAD/main/main.c(1387) : Freeing 0x40939990 (44 bytes), script=- /usr/src/php4-HEAD/Zend/zend_API.c(573) : Actual location (location was relayed) /usr/src/php4-HEAD/main/main.c(1386) : Freeing 0x4093994C (16 bytes), script=- /usr/src/php4-HEAD/main/php_variables.c(175) : Freeing 0x4093989C (16 bytes), script=- Last leak repeated 43 times /usr/src/php4-HEAD/ext/standard/string.c(2492) : Freeing 0x40939860 (1 bytes), script=- Last leak repeated 43 times /usr/src/php4-HEAD/Zend/zend_hash.c(438) : Freeing 0x40938E88 (256 bytes), script=- /usr/src/php4-HEAD/Zend/zend_hash.c(175) : Actual location (location was relayed) /usr/src/php4-HEAD/main/main.c(1214) : Freeing 0x40936D0C (44 bytes), script=- /usr/src/php4-HEAD/Zend/zend_API.c(573) : Actual location (location was relayed) /usr/src/php4-HEAD/main/main.c(1213) : Freeing 0x40936CC8 (16 bytes), script=- At 13:58 06.11.2002, Melvyn Sopacua wrote:
At 13:52 6-11-2002, Marcus Boerger wrote:
When ini setting variables_order is empty there are memory leaks in cgi as well as cli version. See below: marcus [marcus@zaphod marcus]$ echo "<?php var_dump($_ENV);?>"
==> $_ENV isn't set in /bin/sh So memleaks on var_dump(void) Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua


« previous php.dev (#90555) next »