php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32167 Access from 64-bit php to 32-bit Interbase Server returns wrong integer values
Submitted: 2005-03-03 11:20 UTC Modified: 2005-03-04 09:45 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: trx222 at gmx dot de Assigned:
Status: Closed Package: InterBase related
PHP Version: 4.3.8 OS: Suse Linux 9.2 AMD 64 Bit
Private report: No CVE-ID: None
 [2005-03-03 11:20 UTC] trx222 at gmx dot de
Description:
------------
I'm using the firebird libfbclient.so to compile the 64 bit extension interbase.so. The I connect to an interbase 6.0 server on an other pc. When I do a select - query I got wrong integer values:

SELECT ID,CAST(ID AS VARCHAR(30)) as ID2 FROM <table>

71751723646977  1 
71751723646978  2 
71751723646980  4 
71751723646981  5 
71751723646995  19 

./configure' '--prefix=/usr' '--datadir=/usr/share/php' '--mandir=/usr/share/man' '--bindir=/usr/bin' '--libdir=/usr/share' '--includedir=/usr/include' '--sysconfdir=/etc' '--with-_lib=lib64' '--with-config-file-path=/etc' '--with-exec-dir=/usr/lib64/php/bin' '--disable-debug' '--enable-inline-optimization' '--enable-memory-limit' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sigchild' '--disable-ctype' '--disable-session' '--without-mysql' '--disable-cli' '--without-pear' '--with-openssl' '--with-apxs2=/usr/sbin/apxs2-prefork' 'x86_64-suse-linux'

interbase so is loaded in php.ini with extension command.

Reproduce code:
---------------
<?php

$dbh = ibase_connect('82.139.203.122:/home/data/xxx.gdb', 'SYSDBA', 'masterkey');

$stmt = 'SELECT ID,CAST(ID AS VARCHAR(30)) as ID2,TXT,ADAT FROM NUTZ_K';
echo $stmt ."<P>";
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) 
{
   echo $row->ID." ".$row->ID2." ".$row->ID3." ".$row->TXT." ".$row->ADAT. "<br>\n";
}
ibase_free_result($sth);
ibase_close($dbh);

?>

Expected result:
----------------
SELECT ID,CAST(ID AS VARCHAR(30)) as ID2,TXT,ADAT FROM NUTZ_K

1 1 B?rofl?chen 08/24/1996 22:53:47
2 2 Verkehrsfl?chen 08/24/1996 22:53:47
4 4 Sanit?rfl?chen 08/24/1996 22:53:47
5 5 Sonstige 12/06/1996 12:35:21
19 19 Sozialr?ume 01/16/2001 14:44:25

Actual result:
--------------
SELECT ID,CAST(ID AS VARCHAR(30)) as ID2,TXT,ADAT FROM NUTZ_K

71751723646977 1 B?rofl?chen 08/24/1996 22:53:47
71751723646978 2 Verkehrsfl?chen 08/24/1996 22:53:47
71751723646980 4 Sanit?rfl?chen 08/24/1996 22:53:47
71751723646981 5 Sonstige 12/06/1996 12:35:21
71751723646995 19 Sozialr?ume 01/16/2001 14:44:25

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-04 08:39 UTC] trx222 at gmx dot de
Now, the build interbase.so (as shared library) works fine, if I use this with my php-4.3.10 installation!

If I wanted to use your complete build I got an error while loadmodule from apache2: "libphp4.so: undefined symbol: empty_string"
But this is only a reference.

my problem is with the shared library solved - thankyou very much !!!!
 [2005-03-04 09:45 UTC] abies@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.
 [2005-03-04 09:45 UTC] abies@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC