PHP 4.0 Bug #7117 Updated: ibase_query() crashes when inserting a blob_id

From: Date: Tue, 17 Oct 2000 21:42:35 +0000
Subject: PHP 4.0 Bug #7117 Updated: ibase_query() crashes when inserting a blob_id
Groups: php.dev 
Request: Send a blank email to php-dev+get-35334@lists.php.net to get a copy of this message
ID: 7117 User Update by: lb@knuut.de Status: Feedback Bug Type: InterBase related Description: ibase_query() crashes when inserting a blob_id Thank you Jouni, my example do not make troubles anymore. I also did some quick testings with prepare/execute and everything runs well. Lutz Previous Comments: --------------------------------------------------------------------------- [2000-10-17 13:48:49] jah@php.net This is hopefully fixed in CVS. Please replace ext/interbase/interbase.c with http://cvs.php.net/viewcvs.cgi/~checkout~/php4/ext/interbase/interbase.c?rev=1.45 and recompile. And please also tell whether it worked or not... --------------------------------------------------------------------------- [2000-10-10 08:30:42] lb@knuut.de this little script crashes php4.02 and 4.03dev on my linux box no matter if php is running as an apache module or as cgi. It seems that the error is not in the ibase_blob_import(), but in the ibase_query() when trying to insert a blob id. <?php $dbhandle = ibase_connect("/tmp/test.gdb", "itsme", "secret"); ibase_query($dbhandle, "create table test (bid integer, bbb blob)"); ibase_commit(); $bfhandle = fopen("/tmp/test.txt", "r"); $b_str = ibase_blob_import($dbhandle, $bfhandle); ibase_query("insert into test (bid, bbb) values (1, ?)", $b_str); ?> I hope this will help to fix this nasty bug: (gdb) bt #0 0x8098c45 in _efree (ptr=0x8175204) at zend_alloc.c:217 #1 0x80b880d in _php_ibase_free_xsqlda (sqlda=0x81dafbc) at interbase.c:297 #2 0x80ba98d in _php_ibase_exec (ib_resultp=0xbfffe604, ib_query=0x81daebc, argc=1, args=0x81a1680) at interbase.c:1413 #3 0x80bb069 in php_if_ibase_query (ht=2, return_value=0x81ab9cc, this_ptr=0x0, return_value_used=0) at interbase.c:1677 #4 0x80937d8 in execute (op_array=0x81ac60c) at ./zend_execute.c:1519 #5 0x8089e92 in zend_execute_scripts (type=8, file_count=3) at zend.c:717 #6 0x8064b6b in php_execute_script (primary_file=0xbffffac4) at main.c:1199 #7 0x806152c in main (argc=3, argv=0xbffffb24) at cgi_main.c:706 Thanks, Lutz --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7117

« previous php.dev (#35334) next »