php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31954 Interbase returning bool - PHP crash
Submitted: 2005-02-13 12:23 UTC Modified: 2005-03-20 18:09 UTC
Votes:4
Avg. Score:3.8 ± 1.6
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: okke at formsma dot nl Assigned:
Status: No Feedback Package: InterBase related
PHP Version: 5.0.3 OS: Windows XP SP1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: okke at formsma dot nl
New email:
PHP Version: OS:

 

 [2005-02-13 12:23 UTC] 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().

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-23 20:51 UTC] abies@php.net
Did you build php_interbase.dll from source, or did you use the pre-built one from php.net?

 [2005-02-23 22:44 UTC] okke at formsma dot nl
I used the pre-built one from PHP.net
 [2005-02-24 07:32 UTC] abies@php.net
Please try if the error can be reproduced with a php_interbase.dll built from source using the ibase.h header file that comes with Interbase 7.1

 [2005-03-20 18:09 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2008-01-17 19:10 UTC] virtue at rocketmonkeys dot com
I'm experiencing this bug, and I think it might be the same issue.
I make a page with just this:
<?
ibase_connect( "(database_filename)", "(username)", "(password)" );
ibase_query( "create table test ( id integer not null primary key, field1 boolean );" );
ibase_query( "select * from test" );
?>
The connect and "CREATE TABLE" run fine, but the "SELECT" statement crashes Apache.  If I do the same thing without the boolean field, this doesn't happen.  The same statements work fine in IBConsole, so it doesn't seem to be any problem with Interbase or the SQL code itself.  I think this bug needs to be reopened, unless I missed something simple.

php 5.2.5
apache 2.2.6
interbase 2007 on PC, version WI-V8.1.0.257
 [2011-11-07 17:03 UTC] sandi at iol dot it
Same problem here using PHP version 5.3.8, Interbase XE and Windows 7.
I am using PHP_INTERBASE.DLL extracted from PHP-5.3.8-NTS-WIN32-VC9-X86 and gds32.dll version 10.0.2.474 (the Interbase XE version) renamed as fbclient.dll and stored in PHP directory.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC