Re: Bug #2942 Updated: Cursor memory not freed

From: Date: Thu, 09 Dec 1999 18:20:02 +0000
Subject: Re: Bug #2942 Updated: Cursor memory not freed
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-13526@lists.php.net to get a copy of this message
I use several ora_close statements as in the example I attached, and still php crashes as too many cursors open and out of memory (I think) KrisC function zoekArtikels($query) { if ($cursor2 = ora_open($GLOBALS["conn"])) { if (ora_parse($cursor2, $query)) { if (ora_exec($cursor2)) { $i = 0; while(ora_fetch($cursor2)) { $cursor = ora_open($GLOBALS["conn"]); $query2 = "select * from document d, artikel a where d.id = a.id and a.id = ".ora_getcolumn($cursor2,"0")." order by titel"; ora_parse($cursor, $query2); ora_exec($cursor); if (ora_fetch($cursor)) { $res[$i]= new Artikel; $res[$i]->init($cursor); $res[$i]->journal = ora_getcolumn($cursor, "14"); $res[$i]->volume = ora_getcolumn($cursor, "15"); $res[$i]->nummer = ora_getcolumn($cursor, "16"); $res[$i]->pages = ora_getcolumn($cursor, "17"); $i++; } ora_close($cursor); } } } } ora_close($cursor2); return $res; } ---- Kris Cardinaels K.U.Leuven, Dept. Computer Science +32(0)16 327660 ----- Original Message ----- From: Bug Database <php-dev@lists.php.net> To: <Kris.Cardinaels@cs.kuleuven.ac.be>; <php-dev@lists.php.net> Sent: Thursday, December 09, 1999 5:31 PM Subject: Bug #2942 Updated: Cursor memory not freed > ID: 2942 > Updated by: thies > Reported By: krisc@cs.kuleuven.ac.be > Status: Closed > Bug Type: Reproduceable crash > Assigned To: > Comments: > > pelase use ora_close to close cursors that you no longer need. this will happen automagicly at the end of the script. > > Full Bug description available at: http://bugs.php.net/?id=2942 >

« previous php.dev (#13526) next »