#25623 [Opn->Fbk]: Memory leak in function load()
| From: | sniper@php.net | Date: | Tue, 18 Nov 2003 02:49:50 +0000 |
| Subject: | #25623 [Opn->Fbk]: Memory leak in function load() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-50574@lists.php.net to get a copy of this message | ||
ID: 25623
Updated by: sniper@php.net
Reported By: maoy at fjii dot com
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: Windows XP
PHP Version: 4.3.3
New Comment:
You can find debug enabled win32 builds here:
http://www.thebrainroom.net/php-snaps
Previous Comments:
------------------------------------------------------------------------
[2003-10-23 23:03:52] maoy at fjii dot com
I had a try to run the following code on windows and linux, it cause
memory leak on both platform. The size of memory leak depends on the
size of CLOB-field's value and record count.
<?php
$conn = ocilogon("username","password","sid");
$query = "SELECT CLOB_FldName FROM tablename";
$stmt = OCIParse ($conn, $query);
OCIExecute($stmt);
while(ocifetchinto($stmt, $arr,OCI_ASSOC)){
$result = $arr["CLOB_FldName"]->load();
ecco $result;
}
?>
------------------------------------------------------------------------
[2003-10-09 20:08:47] maoy at fjii dot com
I'm not able to compile a debug-build, but it's undoubted that the
function cause memory leak. Please help me as soon as possible.
I am looking forward to reply. Thank you very much.
------------------------------------------------------------------------
[2003-09-24 05:41:54] thies@php.net
sorry, if the leak does not show on unix there's not much
i can do as i don't run windows.
can you compile a debug-build and see if php actually
complains about mem-leaks?
------------------------------------------------------------------------
[2003-09-22 06:04:55] maoy at fjii dot com
In fact, I tried to use following codes:
ocifetchinto($stmt, $arr,OCI_ASSOC);
$result = $arr["CLOB_FLDNAME"]->load();
but it always cause memory leak on Windows system. It doesn't cause
memory leak on Linux system.
By the way, running environment is:
Windows XP
Apache 1.3.26
PHP 4.3.3
Oracle 8.1.7
I am looking forward to reply.
------------------------------------------------------------------------
[2003-09-22 05:09:45] thies@php.net
could you plz replace
$result = OCIResult($stmt, "clob_fldname");
if (is_object ($result)) $result = $result->load();
against:
ocifetchinto($stmt, $arr,OCI_ASSOC);
$result = $arr["CLOB_FLDNAME"]->load();
as this is the code i use all the time and it doesn't
(seem) to leak for me.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/25623
--
Edit this bug report at http://bugs.php.net/?id=25623&edit=1