#31954 [Fbk->Opn]: Interbase returning bool - PHP crash

From: Date: Wed, 23 Feb 2005 21:44:06 +0000
Subject: #31954 [Fbk->Opn]: Interbase returning bool - PHP crash
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-74489@lists.php.net to get a copy of this message
ID: 31954 User updated by: okke at formsma dot nl Reported By: okke at formsma dot nl -Status: Feedback +Status: Open Bug Type: InterBase related Operating System: Windows XP SP1 PHP Version: 5.0.3 New Comment: I used the pre-built one from PHP.net Previous Comments: ------------------------------------------------------------------------ [2005-02-23 20:51:04] abies@php.net Did you build php_interbase.dll from source, or did you use the pre-built one from php.net? ------------------------------------------------------------------------ [2005-02-13 12:23:16] okke at formsma dot nl Description: ------------ I'm using interbase 7. I made a table using a BOOLEAN field. Everything worked fine, until I tried to extract data from the table. Then I found out that the BOOLEAN field was crashing PHP (and, in succession, apache). The error I got with PHP was (command line client): "Warning: ibase_fetch_assoc(): Dynamic SQL Error SQL error code = -804 Incorrect values within SQLDA structure in [...]" (for search-sake: the Apache error was "Parent: child process exited with status 3221225477 -- Restarting.") The problem is not a database failure; IBconsole and Database Workbench both handle the test-SQL perfectly. Reproduce code: --------------- I left the PHP code out, for readability. I'm using ibase_connect(), ibase_query() and ibase_fetch_assoc(). Run the following SQL first: CREATE TABLE TEST ( ID INTEGER NOT NULL, PUBLISHED BOOLEAN DEFAULT 0, CONSTRAINT PK_CMS PRIMARY KEY (ID) ) ; Fill the database with some lines, it doesn't matter what exactly: INSERT INTO TEST(ID, PUBLISHED) VALUES(1,false); INSERT INTO TEST(ID, PUBLISHED) VALUES(2,true); INSERT INTO TEST(ID, PUBLISHED) VALUES(3,false); INSERT INTO TEST(ID, PUBLISHED) VALUES(4,true); Then try to extract data from the database: SELECT * FROM TEST; Expected result: ---------------- (after ibase_query()): an array with the values from the database. Actual result: -------------- A big fat error, where after PHP and Apache will crash. The problem occurs on the line with ibase_query(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31954&edit=1

« previous php.bugs (#74489) next »