Re: Re: Bug #15186 Updated: define/mysql_connect problem
| From: | Yasuo Ohgaki | Date: | Fri, 25 Jan 2002 10:27:58 +0000 |
| Subject: | Re: Re: Bug #15186 Updated: define/mysql_connect problem | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-78097@lists.php.net to get a copy of this message | ||
Andi Gutmans wrote:
> Yasuo,
>
> I don't quite understand. define() hasn't been changed in the Zend Engine
> 1. Can you please send me a reproducing script without pg_*() which
> works on 4.0.6 and crashes on 4.2.0-dev?
>
It seems resources are deleted by RSHUTDOWN, but
Zend is trying to delete them again.
Here is what I got.
Backtraces are attached.
--====== Script #1 =====--
<?php
function foo($path) {
return fopen($path, 'r');
}
define('C1', foo('/etc/passwd'));
echo C1;
?>
-- end --
PHP 4.0.6 (CGI): error msg
Resource id #1
zend_hash.c(921) : ht=0x081df1d0 is already destroyed
zend_hash.c(921) : ht=0x081df1d0 is already destroyed
PHP 4.2.0/ZE1 (CLI): segfualt
PHP 4.2.0/ZE2 (CLI): segfualt
--===== Script #2 ======--
<?php
define ("DB",pg_connect('dbname=test user=yohgaki'));
pg_exec(DB,"select * from sys_session");
?>
-- end --
PHP 4.0.6 (CGI): works
PHP 4.2.0/ZE1 (CLI): segfualt
PHP 4.2.0/ZE2 (CLI): segfualt
--===== Script #3 =====--
<?php
function foo($int) {
return $int;
}
define('C1', foo(100));
echo C1;
?>
-- end --
PHP 4.0.6 (CGI): works
PHP 4.2.0/ZE1 (CLI): works
PHP 4.2.0/ZE2 (CLI): works
--
Yasuo Ohgaki