php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43912 Interbase column names are truncated to 31 characters
Submitted: 2008-01-22 21:14 UTC Modified: 2008-01-23 03:46 UTC
From: virtue at rocketmonkeys dot com Assigned:
Status: Closed Package: InterBase related
PHP Version: 5.2.5 OS: Windows XP SP2
Private report: No CVE-ID:
 [2008-01-22 21:14 UTC] virtue at rocketmonkeys dot com
Description:
------------
The PHP interbase functions seem not to support column names that are longer than 31 characters with Interbase 8.1.  Interbase 5.5 through 6.5 are supposedly limited to 31 character names, but later version are not.

I can query the field with PHP using the full name.  The correct value is returned, but the returned name is incorrectly truncated to 31 characters.  The Interbase IBConsole program returns the correct field name, untruncated.

Reproduce code:
---------------
<?
ibase_connect(...);
ibase_query( "create table TEST1 ( A_________B_________C_________D_________E_________F_________ integer );" );
ibase_query( "insert into TEST1 values ( 1 );" );
$result = ibase_query( "select * from TEST1;" );
$object = ibase_fetch_object( $result );
var_dump( $object );
?>

Expected result:
----------------
object(stdClass)#2 (1) {
  ["A_________B_________C_________D_________E_________F_________"]=>
  int(1)
}


Actual result:
--------------
object(stdClass)#2 (1) {
  ["A_________B_________C_________D"]=>
  int(1)
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-22 21:27 UTC] virtue at rocketmonkeys dot com

 [2008-01-23 01:23 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2008-01-23 03:46 UTC] virtue at rocketmonkeys dot com
iliaa, thank you so much for the fix!  I looked at the CVS commit... such a simple thing, but it makes a *huge* difference for me (I was banging my head against the wall for a good portion today trying to figure this out).  Thanks again, much appreciated!
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 08:02:55 2014 UTC