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
 [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 17:01:34 2024 UTC