php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60235 Interbase BOOLEAN fields cannot be read by SELECT
Submitted: 2011-11-07 17:25 UTC Modified: 2018-06-13 12:27 UTC
From: sandi at iol dot it Assigned: cmb (profile)
Status: Duplicate Package: InterBase related
PHP Version: 5.3.8 OS: Windows 7
Private report: No CVE-ID: None
 [2011-11-07 17:25 UTC] sandi at iol dot it
Description:
------------
Condition:
Interbase XE.
package used: PHP_INTERBASE.DLL inserted in php-5.3.8-nts-Win32-VC9-x86
I have used gds32.dll of Interbase XE (version 10.0.2.474), renamed to fbclient.dll and stored in C:\PHP directory. (This is the one that surely is used because, if I remove it, the PHP_INTERBASE.DLL fails to be loaded).

To replicate, create a table called TB_ERROR in your interbase database:
CREATE TABLE TB_ERROR (
    IDX_ERROR  INTEGER NOT NULL,
    FLAG       BOOLEAN
);


Test script:
---------------
<?php
$database = "127.0.0.1/3052:/database/ERRORPHP.ib";
$username ="sysdba";
$password ="masterkey";
$dbh = ibase_connect($database, $username, $password);
$trans = ibase_trans(IBASE_DEFAULT,$dbh);
$stmt = 'SELECT IDX_ERROR,FLAG FROM TB_ERROR';
$sth = ibase_query($dbh,$stmt);
$line = ibase_fetch_row($sth);
foreach ($line as $col_value) print ("$col_value<BR>\n");
ibase_commit($trans);
?>



Expected result:
----------------
(The table is empty, so you do not expect ant result and any error)

Actual result:
--------------
Error HTTP 500.0 - Internal Server Error
C:\Program Files\PHP\php-cgi.exe

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-13 12:27 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2018-06-13 12:27 UTC] cmb@php.net
I'm marking this as duplicate of bug #74946.  Actually, it's the
other way round, but the other ticket contains more useful
information.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 16 01:01:28 2024 UTC