#42089 [Com]: erro blob firebird php

From: Date: Fri, 28 Nov 2008 15:55:40 +0000
Subject: #42089 [Com]: erro blob firebird php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-131453@lists.php.net to get a copy of this message
ID: 42089 Comment by: BenjaminSchwarze at TheUnknownOnes dot net Reported By: anita dot sobreira at gmail dot com Status: No Feedback Bug Type: InterBase related Operating System: fedora 6 PHP Version: 5.2.3 New Comment: Patch: --- ibase_blobs.c_orig 2008-11-28 16:43:59.000000000 +0100 +++ ibase_blobs.c 2008-11-28 16:44:52.000000000 +0100 @@ -78,7 +78,7 @@ /* shortcut for most common case */ if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) { - spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd); + spprintf(&result, BLOB_ID_LEN+1, "0x%0*x%0*x", 8, qd.gds_quad_low, 8, qd.gds_quad_high); } else { ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low; spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, res); Previous Comments: ------------------------------------------------------------------------ [2008-11-26 08:34:00] BenjaminSchwarze at theunknownones dot net Dont know where to post the solution. Thats i'll try this way. Solution: - get the sources of your php-version - in ext/interbase/ibase_blobs.c search the function "_php_ibase_quad_to_string" - replace the line "spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd);" with "spprintf(&result, BLOB_ID_LEN+1, "0x%0*x%0*x", 8, qd.gds_quad_low, 8, qd.gds_quad_high);" - compile the interbase module (./configure --with- interbase=shared,/opt/firebird) - copy the module (modules/interbase.so) to /usr/lib64/php/modules - try it ... should work This worked for me. My System: Fedora Core 8 64bit, php 5.2.6, Firebird 2.1 ------------------------------------------------------------------------ [2008-11-05 09:01:05] tinon at 21cn dot com slove this problem,php,please! ------------------------------------------------------------------------ [2008-08-27 22:22:22] milan dot tomes at seznam dot cz I'm having these problems too on Windows XP (32bit) with Firebird 2.1. When I tried to use php_interbase.dll from version 5.2.1 everything works fine. 5.2.3 & 5.2.6 are not working. ------------------------------------------------------------------------ [2008-07-19 22:18:28] voev at vilex dot cc This bug really persists in 64 bit linux. (on Linux-32 works) ------------------------------------------------------------------------ [2007-08-28 15:10:30] ale dot pas at tiscali dot it The problem is still there in 5.2.3, please reopen this bug. Tested on linux 64bit. Configure: ./configure --with-interbase=/opt/firebird --with-config-file-path=/etc \ --with-apxs2=/usr/sbin/apxs2 \ --with-gd=/usr/lib64 \ --includedir=/usr/include \ --enable-fastcgi \ --with-gettext \ --with-mysql=/usr/local/lib/mysql/ \ --with-openssl_dir=/usr/include/openssl \ --with-curl \ --with-curlwrappers \ --with-zlib \ --without-pear ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/42089 -- Edit this bug report at http://bugs.php.net/?id=42089&edit=1

« previous php.bugs (#131453) next »