|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13376 strings from ibase_fetch_row() have hidden garbage at end
Submitted: 2001-09-21 12:03 UTC Modified: 2001-10-17 06:47 UTC
From: tsnyder at internap dot com Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.0.5 OS: Linux 2.4.4-ac9 Debian viariant
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: tsnyder at internap dot com
New email:
PHP Version: OS:


 [2001-09-21 12:03 UTC] tsnyder at internap dot com
I'm getting hidden garbage at the end of string values 
returned from Interbase; I'm using these strings as keys 
to arrays and getting back nothing.  It appears there is 
junk at the end of the string (on the stack) that the 
array-index routine is picking up, but the string routines 

  $row = ibase_fetch_row($queryRv);
  $STATE = $row[0];

  // this line prints "foo[RAW] = []"
  echo "foo[$STATE] = [".$foo[$STATE]."]";

  // this line prints "foo[RAW] = [1]"
  echo "foo[$STATE] = [".$foo[trim($STATE)]."]";

For more detail see:

Any idea what might be wrong here?
Trent W. Snyder

P.S. from phpinfo():

'./configure' '--with-apxs' '--with-mysql' 
'--enable-trans-sid' '--enable-trackvars'

Apache/1.3.19 (Unix) PHP/4.0.5 mod_perl/1.25 mod_ssl/2.8.1 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-21 12:08 UTC]
I think this may be fixed.  Could you try a current snapshot from and let us know?
 [2001-09-21 12:24 UTC] tsnyder at internap dot com
Sure.  It may take a bit (production environment <sigh>), but I should be able to get it at least on my test machine.
 [2001-09-21 13:33 UTC] tsnyder at internap dot com
I managed to get snap php4-200109202235 compiled and 
installed on the test system.  With a very simple test 
script it seems to have worked -- the indexing looks like 
it works.

However, now the "real" web-pages don't run to completion. 
 I tried commenting out all the rest of the PHP code (just 
neaving enough native HTML to end out the tables, etc.) 
and it still didn't work.  By throwing in copious amounts 
(~2-3k) of extra text (<pre>blah blah blah...</pre>) -- 
especially near the end of the file -- I managed to get 
the page to fully display.

Different bug?

Was the indexing a "simple" patch?  Given that the latest 
snap chokes, I would love to try it on our "in production" 
code that ... mostly works. <g>

 [2001-09-21 13:48 UTC]
Sounds odd.  Sorry to keep giving you more stuff to play with, but could you try PHP 4.0.7RC2 from ?

Also, you can have a look at the activity in the interbase extension code here:

You may be able to glean the patch out of that which fixes your specific problem.
 [2001-10-17 06:47 UTC]
No feedback. Closing.

If you're still willing to play, try the latest RC:
Reopen this report if you have some new information.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 13:01:27 2024 UTC