PHP 4.0 Bug #7355 Updated: weird global variable corruption
| From: | stas@php.net | Date: | Mon, 23 Oct 2000 09:09:31 +0000 |
| Subject: | PHP 4.0 Bug #7355 Updated: weird global variable corruption | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35852@lists.php.net to get a copy of this message | ||
ID: 7355
Updated by: stas
Reported By: dolecek@ibis.cz
Status: Feedback
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Please produce as short as possible script that reproduces this problem, if possible - without
needing any external entity, such as SQL server.
Previous Comments:
---------------------------------------------------------------------------
[2000-10-19 18:27:20] dolecek@ibis.cz
I use PHP as DSO module loaded to Apache 1.3.12.
I have a module file, which is brought in via
include_once statement. There are two module-global
variables in the module. One of them is filled in
by data from database when the module is loaded, like
this
while($row = mysql_fetch_object($dbres)) {
$arr[$row->id] = $row;
}
Later on, the contents of the array is
printed via one of module's function. Now, one
of items in the array get's corrupted (third of four
items). It suddenly contains an array which contains
link to itself - print_r() of that item doesn't
end ever (stopped the browser after received
about 15MB of data, where the script generates
like 4KB maximum). After that, the httpd gets
caboom, no PHP script returns any output and
httpd is closing connections immediatelly, before
even reading client headers. If I kill httpd,
it takes excessively long to die off - like
2 minutes where it normally takes like 5s.
After I restart httpd and try the same script,
it fails the same way. Seems like stack corruption or something of that sort. It's repeatable
for me,
though creating simple script which would trigger
the same bug would be probably quite problematic.
Unfortunately, I've not had enough time to track this
thing to the end yet, so I don't know what it is caused
by. All I know is that this problem
doesn't exist on 4.0.1pl2 - the same code works okay
on it. I'd be willing to track this problem down.
Just tell me which info you need and I'd try to provide
it.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7355