[PHP-DEV] empty variables_order, was PHP CLI environment variables

2002-11-06 Thread Marcus Boerger
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);? | 
/usr/src/php4-ZE1/sapi/cgi/php-cgi
/home/marcus/-(1) : Warning - Wrong parameter count for var_dump()
Status: 200
Content-type: text/html
X-Powered-By: PHP/4.3.0-dev

/usr/src/php4-ZE1/Zend/zend_hash.c(262) :  Freeing 0x084409C0 (40 bytes), 
script=-
Last leak repeated 40 times
/usr/src/php4-ZE1/main/main.c(1434) :  Freeing 0x08440928 (12 bytes), script=-
/usr/src/php4-ZE1/Zend/zend_hash.c(178) :  Freeing 0x084408D8 (32 bytes), 
script=-
/usr/src/php4-ZE1/main/main.c(1387) :  Freeing 0x08440878 (44 bytes), script=-
/usr/src/php4-ZE1/Zend/zend_API.c(565) : Actual location (location was relayed)
/usr/src/php4-ZE1/main/main.c(1386) :  Freeing 0x08440838 (12 bytes), script=-
/usr/src/php4-ZE1/main/php_variables.c(175) :  Freeing 0x08440798 (12 
bytes), script=-
Last leak repeated 38 times
/usr/src/php4-ZE1/ext/standard/string.c(2485) :  Freeing 0x08440408 (1 
bytes), script=-
Last leak repeated 38 times
/usr/src/php4-ZE1/Zend/zend_hash.c(440) :  Freeing 0x08440278 (256 bytes), 
script=-
/usr/src/php4-ZE1/main/main.c(1214) :  Freeing 0x0843E3B8 (44 bytes), script=-
/usr/src/php4-ZE1/Zend/zend_API.c(565) : Actual location (location was relayed)
/usr/src/php4-ZE1/main/main.c(1213) :  Freeing 0x0843E378 (12 bytes), script=-

At 13:30 06.11.2002, Kjartan Mannes wrote:
I just tried using php-cli from the latest cvs and am a little confused
by the placement of shell environment variables. $_ENV is empty, but the
values are stored in $HTTP_SERVER_VARS and $_SERVER.

Is this the proper behavior?

--
Kjartan [EMAIL PROTECTED] (http://natrak.net/)
:: Women are made to be loved, not understood. - Oscar Wilde


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] empty variables_order, was PHP CLI environment variables

2002-11-06 Thread Melvyn Sopacua
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

[marcuszaphod 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


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] empty variables_order, was PHP CLI environment variables

2002-11-06 Thread Marcus Boerger
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.

[marcuszaphod php4-HEAD]$ php -d variables_order=\\ -r 'var_dump($_ENV);'
array(0) {
}
[marcuszaphod 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
[marcuszaphod php4-HEAD]$ php -d variables_order=\\ -r 'var_dump(null);'
NULL
[marcuszaphod php4-HEAD]$ php -d variables_order=\\ -r 'var_dump($x);'
Command line code(1) : Notice - Undefined variable:  x
NULL
[marcuszaphod php4-HEAD]$ php -d variables_order=\\ -r 'var_dump();'
Command line code(1) : Warning - Wrong parameter count for var_dump()
[marcuszaphod 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

[marcuszaphod 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




--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php