memory leak?

From: Date: Thu, 15 Jun 2000 02:37:22 +0000
Subject: memory leak?
Groups: php.version4 
Request: Send a blank email to php-version4+get-16290@lists.php.net to get a copy of this message
Hi all, I'm new to both PHP and Oracle. I've installed Oracle 8.1.6 and PHP 4.0.0 on RedHat 6.1. I've wrote a testing script to connect to Oracle and display the content of a table. It did succeed, however, it seems have memory leak. Each time I reload the testing page from the browser, it consumes memory! Isn't that every I logoff Oracle, the memory would be released? I can't see it happens! Could anyone help? Here's my code: <? putenv("ORACLE_HOME=/usr/local/oracle/8i/u01/app/oracle/product/8.1.6"); putenv("ORACLE_SID=SWCO"); if ($connection = ora_logon("scott", "tiger")) { if ($cursor = ora_open($connection)) { $query = "select * from php_test "; if (ora_parse($cursor, $query)) { if (ora_exec($cursor)) { while (ora_fetch($cursor)) { for ($idx=0; $idx< ora_numcols($cursor); $idx++) { print (ora_getcolumn($cursor, $idx)); print '&nbsp;'; } print "<br>\n"; } print "<br>\n"; print (ora_numrows($cursor)); print "<br>\n"; } else { print "<b>ora_exec Error</b><br>\n"; print ("Error Code: "); print (ora_errorcode($cursor)); print "<br>\n"; print "Error Messages: "; print (ora_error($cursor)); print "<br>\n"; } } else { print "<b>ora_parse Error</b><br>\n"; print ("Error Code: "); print (ora_errorcode($cursor)); print "<br>\n"; print "Error Messages: "; print (ora_error($cursor)); print "<br>\n"; } ora_close($cursor); } else { print "Cursor couldn't be opened!<br>\n"; } ora_logoff($connection); } ?> Greetings, Janus

« previous php.version4 (#16290) next »