php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2720 Memory leak
Submitted: 1999-11-13 15:24 UTC Modified: 1999-11-13 17:58 UTC
From: tig at skv dot org Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0 Beta 2 OS: Linux, SuSE 6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tig at skv dot org
New email:
PHP Version: OS:

 

 [1999-11-13 15:24 UTC] tig at skv dot org
The following script will eat up all server memory in no time when being called using the CGI. Does not happen when using the PHP3 CGI. This is independent of calling unset() or not, it will eat up the memory just as fast.

<?
set_time_limit(0);
while(TRUE)
{
        $db_handle = mysql_connect("localhost", "user", "passwd");
        $result = mysql_db_query("db", "SELECT * FROM mytable", $db_handle);
        while($row = mysql_fetch_array($result))
                unset($row);
        mysql_free_result($result);
        mysql_close($db_handle);
}
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-11-13 17:58 UTC] tig at skv dot org
Seems to be fixed in current CVS

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 14:01:33 2024 UTC