#32167 [Opn->Csd]: Access from 64-bit php to 32-bit Interbase Server returns wrong integer values
| From: | abies@php.net | Date: | Fri, 04 Mar 2005 08:45:03 +0000 |
| Subject: | #32167 [Opn->Csd]: Access from 64-bit php to 32-bit Interbase Server returns wrong integer values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77247@lists.php.net to get a copy of this message | ||
ID: 32167
Updated by: abies@php.net
Reported By: trx222 at gmx dot de
-Status: Open
+Status: Closed
Bug Type: InterBase related
Operating System: Suse Linux 9.2 AMD 64 Bit
PHP Version: 4.3.8
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-03-04 08:39:30] 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-03 22:33:10] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-03-03 11:20:02] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32167&edit=1