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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 19 = ?
Subscribe to this entry?

 
 [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: Mon May 20 20:01:32 2024 UTC