|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13020 Error when reading data from Interbase 6 database
Submitted: 2001-08-29 05:41 UTC Modified: 2003-09-02 09:20 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: lpap at forthnet dot gr Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: lpap at forthnet dot gr
New email:
PHP Version: OS:


 [2001-08-29 05:41 UTC] lpap at forthnet dot gr
Hi there, thanks for reading this.

I am running php4.0.6 under windows 2000, apache 1.3.x and as database I am using Interbase 6.0 
Php is running perfectly.

The problem is when trying to read data in a while statement from the database. In particular i have written :

$dbh = ibase_connect ($hostname, $DBUsername, $DBPassword);

 $stmt = "SELECT * FROM links";
 $sth = ibase_query ($dbh, $stmt);

 while ($row = ibase_fetch_object ($sth) ) //problem here
        echo $row->L_NAME;

 ibase_close ($dbh);

Up to the while statement everything is fine. The connection is set correctly and the query is ran.
The problem is when i say : while ($row = ibase_fetch_object ($sth) )

After the execution of that line i get :

Application error. Click ok to close, cancel to debug.

The interesting thing is that if i dont use a while but :
$row = ibase_fetch_object ($sth) ;
echo $row->L_NAME;

it works fine. 

I tried ibase_fetch_row and get the same error.

I would be very grateful if you could advise me on the matter.

Thank you very much.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-08 07:58 UTC]
--- ---
This is an addendum to bug 13020.
I experience this bug in all versions above 4.0.4 with Windows NT 4 and Windows 2000 using
Microsoft Internet Information Service 4 respective 5.

The eroor occurs on a repeated call to an ibase_fetch_*()-function.

The original reporter says it does not occur if he doesn't use a while loop. This is not
because of the missing loop but because he only calls ibase_fetch_row() or
ibase_fetch_object() once.
 [2002-03-21 10:14 UTC] bard at bardnet dot de

I installed PHP 4.12 and in my script replaced the call to ibase_query(...) with the call to ibase_prepare(...) and ibase_execute(...). It seems to me the error has gone.

It makes some sense to me. The problem thus seems to be ibase_query(...) somehow stores the result wrong(ly).

I keep testing.

 [2003-09-02 09:20 UTC]
Probably segfault on InterBase API error (like #7014).

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 02:01:28 2024 UTC