From: trx222 at gmx dot de Operating system: Suse Linux 9.2 AMD 64 Bit PHP version: 4.3.8 PHP Bug Type: InterBase related Bug description: Access from 64-bit php to 32-bit Interbase Server returns wrong integer values
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 -- Edit bug report at http://bugs.php.net/?id=32167&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32167&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32167&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32167&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32167&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32167&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32167&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32167&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32167&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32167&r=support Expected behavior: http://bugs.php.net/fix.php?id=32167&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32167&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32167&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32167&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32167&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32167&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32167&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32167&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32167&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32167&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32167&r=mysqlcfg