Bug #17040 Updated: ibase_close() crashes PHP when there is some open blobs
| From: | daniela@php.net | Date: | Tue, 14 May 2002 18:02:24 +0000 |
| Subject: | Bug #17040 Updated: ibase_close() crashes PHP when there is some open blobs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-7656@lists.php.net to get a copy of this message | ||
ID: 17040
Updated by: daniela@php.net
Reported By: flying@dom.natm.ru
-Status: Assigned
+Status: Closed
Bug Type: InterBase related
Operating System: Windows 2000
PHP Version: 4.2.0
Assigned To: daniela
New Comment:
Fixed both in CVS and release.
Now, if you don't explicitly close blobs before ibase_close() you 'll
receive an error.
Always call ibase_blob_close() after reading or writing it to not lose
data.
Documentation still lacking .... :(
Previous Comments:
------------------------------------------------------------------------
[2002-05-07 03:53:43] daniela@php.net
ok....I can reproduced it
assigned to me
------------------------------------------------------------------------
[2002-05-06 09:00:40] flying@dom.natm.ru
Unfortunatelly i don't compile PHP by myself (i use windows binaries of
PHP, downloaded from www.php.net). And i have no access to unix box. So
i'm unable to create backtrace, you asking me for.
------------------------------------------------------------------------
[2002-05-06 08:51:15] mfischer@php.net
To properly diagnose this bug, we need a backtrace to see what is
happening behind the scenes. To find out how to generate a backtrace,
please read http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open".
------------------------------------------------------------------------
[2002-05-06 08:50:25] flying@dom.natm.ru
This bug is similar to already resolved bugs 14558 and 15419, but
problem is still persists when there is available some code to work
with BLOBs.
Here is example:
CREATE TABLE TEST_TABLE (
ID INTEGER NOT NULL,
STR_CONTENT VARCHAR(100),
BLOB_CONTENT BLOB SUB_TYPE 1 SEGMENT SIZE 80
);
$db = ibase_connect($database,$user,$password);
$result = ibase_query($db,'select * from test_table');
while($row = ibase_fetch_row($result))
{
$info = ibase_blob_info($row[2]);
$data = '';
$blob = ibase_blob_open($bid);
for($i=0;$i<$info[1];$i++)
$data .= ibase_blob_get($blob,$info[2]);
ibase_blob_close($blob);
echo $data;
};
ibase_free_result($result);
ibase_close();
This code works fine, but if i remove ibase_blob_close() function call
(and therefore leave BLOB open) - PHP will crash on calling
ibase_close().
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17040&edit=1