From:             okke at formsma dot nl
Operating system: Windows XP SP1
PHP version:      5.0.3
PHP Bug Type:     InterBase related
Bug description:  Interbase returning bool - PHP crash

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 bug report at http://bugs.php.net/?id=31954&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31954&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31954&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31954&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31954&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31954&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31954&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31954&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31954&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31954&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31954&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31954&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31954&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31954&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31954&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31954&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31954&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31954&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31954&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31954&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31954&r=mysqlcfg

Reply via email to