|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32053 ibase_query(): message length error
Submitted: 2005-02-21 15:47 UTC Modified: 2007-11-01 22:47 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: steven dot harrison3 at ntlworld dot com Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.9 OS: windows 2000 pro
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: steven dot harrison3 at ntlworld dot com
New email:
PHP Version: OS:


 [2005-02-21 15:47 UTC] steven dot harrison3 at ntlworld dot com
I use a number of if statements to select an SQL string (in this case to execute a stored procedure in a firebird database)to go in a $query variable.
 When the string is created and ran as a query the following is kicked out onto the screen:
ibase_query(): message length error(encountered 0, expected 7346) in ....

a typical sql string generated may be:
EXECUTE PROCEDURE SEARCH_ALL_PARAM('Teesside','business planning','Middlesbrough','the'); 

The parameters are taken from 4 fields on a search web page. 

Reproduce code:
//Stored procedures used:
//SEARCH_NO_PARAM  - where all the search boxes have 'any' and keyword ''
if ($provider == "any" && $level == "any" && $location == "any" && $keyword == "")
//SEARCH_ALL_PARAM - where all the search boxes have information.
if ($provider != "any" && $level != "any" && $location != "any" && $keyword != "")
$query = "EXECUTE PROCEDURE SEARCH_ALL_PARAM('".$provider."','".$level."','".$location."','".$keyword."');"; 
// ### some $query removed to keep things brief. ###
      <div align="center"><font size="+1"><strong>Queries and Reports about the
        courses :</strong> </font> </div>
      <p align="center">

        <input name="submit" type="submit" value="back and change search">
        <input name="button2" type="button" onClick="window.location.replace('Query.php')" value="new search">
        <input name="button2" type="button" onClick="window.location.replace('information_syllabus.php')" value="main menu">
      <div align="center">
        <table width="100%" border="1">
          <tr bgcolor="#e0ffe0">
            <td>Course Title</td>
            <td bgcolor="#e0ffe0">Location</td>
            <td>Entry requirements</td>

          				$result = ibase_query($db, $query);
						while ($row = ibase_fetch_object($result)) {?>
          <tr bgcolor="#f0fffe">
            <td><a href="coursedetail.php?courseid=<? echo $row->ENTRYID;?>"><? echo $row->COURSETITLE;?></a></td>
            <td bgcolor="#f0fffe">
						if ($location=="any"){
							$query2 = "SELECT * FROM TBL_MODULE_DELIVERY Where ENTRYID='".$row->ENTRYID."'";
						} else {
							$query2 = "SELECT * FROM TBL_MODULE_DELIVERY Where ENTRYID='".$row->ENTRYID."' AND DELIVERYTOWN='".$location."'";
						echo "University provider : ";
						if (isset ($row->PROVIDERINSTITUTION) && $row->PROVIDERINSTITUTION!="") {echo $row->PROVIDERINSTITUTION;}else{ echo " - ";}
						echo "<BR> Delivery Town of Location(s): ";
						$result2 = ibase_query($db, $query2);
						while ($row2 = ibase_fetch_object($result2)) {
							if (isset ($row2->DELIVERYTOWN) && $row2->DELIVERYTOWN!=""){
								echo $row2->DELIVERYTOWN." - ";
							} else {
								echo " - ";
						} ?>

Expected result:
return a result set from a search of courses in a firebird database.

Actual result:
$query echoed to screen to see if search string right:
EXECUTE PROCEDURE SEARCH_ALL_PARAM('Teesside','business planning','Middlesbrough','the');

Then the warning message:
Warning: ibase_query(): message length error (encountered 0, expected 7346) in c:\program files\apache group\apache\htdocs\e_prospectus\results.php on line 252

Warning: ibase_fetch_object(): supplied argument is not a valid InterBase result resource in c:\program files\apache group\apache\htdocs\e_prospectus\results.php on line 253


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-20 18:00 UTC]
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.

 [2006-04-12 13:17 UTC] garga at FreeBSD dot org
I had the same problem with 4.4.2 version, after update to php4-STABLE-latest.tar.gz everything worked fine. I think the bug can be closed.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 31 22:03:37 2023 UTC