php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25820 PHP 4.3.3 Memory leak.
Submitted: 2003-10-10 09:52 UTC Modified: 2003-10-12 22:17 UTC
Votes:4
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: david dot ruiz at elementstudio dot com dot br Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 4.3.3 OS: RedHat linux 9
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david dot ruiz at elementstudio dot com dot br
New email:
PHP Version: OS:

 

 [2003-10-10 09:52 UTC] david dot ruiz at elementstudio dot com dot br
Description:
------------
The memory used by php to run to the folowing script is growing without stopping....

I tried php snaps... but the problem was not solved. 



Reproduce code:
---------------
<?
for($c=0;$c<60;$c++){
        $xmlQueue = domxml_new_doc("1.0");
        $xmlQueue_root = $xmlQueue->create_element("queue_out");
        $xmlQueue->append_child($xmlQueue_root);
        $str = $c."s\n";
        echo $str;
        sleep(1);
        unset($str);
        unset($xmlQueue_root);
        unset($xmlQueue);
}
?>

Expected result:
----------------
No memory overflow.

Actual result:
--------------
The memory used by php is growing without stopping. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-10 11:37 UTC] sniper@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

..why wouldn't it grow? 

 [2003-10-11 10:07 UTC] david dot ruiz at elementstudio dot com dot br
With this modification i can use the "$xmlQueue->free()" function.

<?
for($c=0;$c<99999999;$c++){
        $xmlQueue = domxml_new_doc("1.0");
        $xmlQueue_root = $xmlQueue->create_element("queue_out");
        $xmlQueue->append_child($xmlQueue_root);
        $str = $c."sn";
        echo $str;
        sleep(1);
        unset($str);
        $xmlQueue->free();
}
?>
 [2003-10-12 22:17 UTC] sniper@php.net
$xmlQueue->free(); works fine without any modifications to
PHP 4.3.3 sources. (and definately works fine with latest STABLE CVS snapshot)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC