PHP 4.0 Bug #2720: Memory leak

From: Date: Sat, 13 Nov 1999 20:24:34 +0000
Subject: PHP 4.0 Bug #2720: Memory leak
Groups: php.dev 
Request: Send a blank email to php-dev+get-12453@lists.php.net to get a copy of this message
From: tig@skv.org Operating system: Linux, SuSE 6.1 PHP version: 4.0 Beta 2 PHP Bug Type: MySQL related Bug description: Memory leak 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); } ?>

« previous php.dev (#12453) next »