PHP 4.0 Bug #3709: Memory leak when calling OCILogon/OCIExecute oci8 call
| From: | joem at analytika dot com | Date: | Thu, 02 Mar 2000 17:19:05 +0000 |
| Subject: | PHP 4.0 Bug #3709: Memory leak when calling OCILogon/OCIExecute oci8 call | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16297@lists.php.net to get a copy of this message | ||
From: joem@analytika.com
Operating system: redhat linux 6.1 (2.2.12-20) smp
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Oracle related
Bug description: Memory leak when calling OCILogon/OCIExecute oci8 call
Sample code
<?
print "Oracle_Home: " . getenv("ORACLE_HOME") . "<BR>";
/* If you change the OCILogon to OCIPLogon, no memory leak! */
if($conn = OCILogon("<user>","<pwd>","<TNS>"))
{
print("Connection succeeded!<BR>");
$stmt = OCIParse($conn,"select * from all_tables");
OCIExecute($stmt);
/* Notice I'm not getting any row or column information
back... */
OCIFreeStatement($stmt);
OCILogoff($conn);
} else {
print("Connection failed!<BR>");
}
?>
Note: I am running a smp kernel (two 550 PIIIs)
php was compiled with:
--with-mysql --with-oci8 --enable-track-vars
I tracked it as far as the OCIServerDetach call in oci8.c...the memory is not released after this
call is made, and there is no error...