Re: [PHP4BETA] memory leak?

From: Date: Thu, 15 Jun 2000 07:22:21 +0000
Subject: Re: [PHP4BETA] memory leak?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-16292@lists.php.net to get a copy of this message
On Thu, Jun 15, 2000 at 10:37:22AM +0800, janus wrote: > Hi all, at what rate does your apache "grow"? > > 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 > > > -- > PHP 4.0 Beta Mailing List <http://www.php.net/version4/> > To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net > For additional commands, e-mail: php4beta-help@lists.php.net > To contact the list administrators, e-mail: php4beta-admin@lists.php.net -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#16292) next »