php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4750 When storing resource objects in static variables, PHP goes into a deadly loop.
Submitted: 2000-06-01 12:26 UTC Modified: 2000-06-05 15:49 UTC
From: php at raylucke dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.0 Release OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at raylucke dot com
New email:
PHP Version: OS:

 

 [2000-06-01 12:26 UTC] php at raylucke dot com
The faulty code is below.

This is a VERY bad bug. It will cause Apache / PHP to eat CPU cycles and put in the log the following line continuously:<br>
Fatal error  ht=40310d44 is already destroyed in zend_hash.c:519 in Unknown on line 0<br>

This is not a dir() bug. It happens any time you try to store a resource object (such as dir(), mysql_query(), etc.) in a static variable.<br><br>

&lt;?
static $t = 0;
$t = dir(".");
?&gt;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-05 15:49 UTC] stas at cvs dot php dot net
Fixed in CVS.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC