Hi, Attached is a patch against the PHP_4_3 branch which appears to fix the bug #20539, while I haven't expected for this to be a cure at all. I guess destruction order of constants and resources have something to do with this issue.
Moriyoshi
Index: php_cli.c =================================================================== RCS file: /repository/php4/sapi/cli/php_cli.c,v retrieving revision 1.51.2.1 diff -u -r1.51.2.1 php_cli.c --- php_cli.c 14 Nov 2002 21:09:42 -0000 1.51.2.1 +++ php_cli.c 11 Dec 2002 03:43:01 -0000 @@ -377,22 +377,19 @@ php_stream_to_zval(s_err, zerr); ic.value = *zin; - zval_copy_ctor(&ic.value); - ic.flags = CONST_CS | CONST_PERSISTENT; + ic.flags = CONST_CS; ic.name = zend_strndup("STDIN", 6); ic.name_len = 6; zend_register_constant(&ic TSRMLS_CC); oc.value = *zout; - zval_copy_ctor(&oc.value); - oc.flags = CONST_CS | CONST_PERSISTENT; + oc.flags = CONST_CS; oc.name = zend_strndup("STDOUT", 7); oc.name_len = 7; zend_register_constant(&oc TSRMLS_CC); ec.value = *zerr; - zval_copy_ctor(&ec.value); - ec.flags = CONST_CS | CONST_PERSISTENT; + ec.flags = CONST_CS; ec.name = zend_strndup("STDERR", 7); ec.name_len = 7; zend_register_constant(&ec TSRMLS_CC);
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php