php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42089 erro blob firebird php
Submitted: 2007-07-24 16:00 UTC Modified: 2007-08-03 01:00 UTC
Votes:22
Avg. Score:4.8 ± 0.6
Reproduced:17 of 17 (100.0%)
Same Version:7 (41.2%)
Same OS:4 (23.5%)
From: anita dot sobreira at gmail dot com Assigned:
Status: No Feedback Package: InterBase related
PHP Version: 5.2.3 OS: fedora 6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: anita dot sobreira at gmail dot com
New email:
PHP Version: OS:

 

 [2007-07-24 16:00 UTC] anita dot sobreira at gmail dot com
Description:
------------
error in make test 
and after error in blob with php 5.2.3 and firebird 
i test with php 5.2.2 , 5.2.1 
firebirdCS 1.5 and 2.0 ever a have the same error 
 i am use fedora 6
i test in red hat entreprise 4 and i have the same error
 my selinux is disabled



Reproduce code:
---------------
when i did the "make test"
it show this error 

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
double to string conversion tests [Zend/tests/double_to_string.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
InterBase: connect, close and pconnect [ext/interbase/tests/002.phpt]
InterBase: misc sql types (may take a while) [ext/interbase/tests/003.phpt]
InterBase: BLOB test [ext/interbase/tests/004.phpt]
InterBase: transactions [ext/interbase/tests/005.phpt]
InterBase: binding (may take a while) [ext/interbase/tests/006.phpt]
InterBase: array handling [ext/interbase/tests/007.phpt]
InterBase: event handling [ext/interbase/tests/008.phpt]
Bug #22414 (passthru() does not read data correctly) [ext/standard/tests/file/bug22414.phpt]
strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt]
XMLWriter: libxml2 XML Writer, Elements & Attributes [ext/xmlwriter/tests/007.phpt]
XMLWriter: libxml2 XML Writer, Elements & Attributes [ext/xmlwriter/tests/OO_007.phpt]
=====================================================================



after when i test with php page I had this warning 

Warning: ibase_blob_info() [function.ibase-blob-info]: invalid BLOB ID in /var/www/html/internet/intranet/novo/marketing/solVisualizar.php on line 143

Warning: ibase_blob_open() [function.ibase-blob-open]: invalid BLOB ID in /var/www/html/internet/intranet/novo/marketing/solVisualizar.php on line 144

Warning: ibase_blob_get(): supplied argument is not a valid Interbase blob resource in /var/www/html/internet/intranet/novo/marketing/solVisualizar.php on line 146

Warning: ibase_blob_close(): supplied argument is not a valid Interbase blob resource in /var/www/html/internet/intranet/novo/marketing/solVisualizar.php on line 148

 my configure  is this 

 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/lib/mysql  --with-interbase=/opt/firebird --with-jpeg-dir=/usr --enable-sockets  --prefix=/usr --sysconfdir=/etc/php  --with-mod_charset --localstatedir=/var --with-config-file-path=/etc/php --with-config-file-scan-dir=/etc/php --disable-debug --enable-pic --enable-dbase --disable-rpath --enable-inline-optimization --with-bz2 --with-db4 --with-curl --with-freetype-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --without-gmp --with-iconv --with-openssl --with-pspell --with-xml --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-shmop --enable-sysvmsg --enable-track-vars --enable-trans-sid --disable-yp --enable-wddx --with-pear --enable-memory-limit --enable-calendar --enable-dbx --enable-dio --with-mime-magic --with-pgsql=/usr/local/pgsql  --enable-embed --with-readline --enable-gd-jis-conv --enable-fastcgi --enable-discard-path --enable-force-cgi-redirect --enable-dba --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --prefix=/usr/local/apache2/php --with-config-file-path=/usr/local/apache2/php  -with-z=/usr/include/linux

i don?t know what to do with this 
i am crazy with this 

help me please



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-08-28 15:10 UTC] 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
 [2008-07-19 22:18 UTC] voev at vilex dot cc
This bug really persists in 64 bit linux.
(on Linux-32 works)
 [2008-08-27 22:22 UTC] 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-11-05 09:01 UTC] tinon at 21cn dot com
slove this problem,php,please!
 [2008-11-26 08:34 UTC] 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-28 15:55 UTC] BenjaminSchwarze at TheUnknownOnes dot net
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);
 [2008-12-04 11:16 UTC] gran_magno at hotmail dot com
From Alex El Magno - Brazil gran_magno@hotmail.com
It is the code and message - function.ibase-blob-open ... : 
<?
// $connect = ibase_connect('db/CEP.GDB','meulogin','minhasenha','ISO8859_1', '100', '1') // ISO8859_1
 $connect = ibase_connect('db/CEP.GDB','mycode','mypassord')
  or exit("<b>Phodeu!</b>&nbsp;-&nbsp;Falha na conex?o $ibase"); //   die("Falha na conex?o");
 $tabela = "projeto";
 $select="SELECT * FROM $tabela";
 if(!$result=ibase_query($connect,$select))
  {exit("<h1>Phodeu!</h1><br> $select <br> errcode: ".ibase_errcode(void)."<BR> _errmsg:".ibase_errmsg(void));
  }
 $ncol=ibase_num_fields($result);
 $tipo=array();
 for($i=0;$i<$ncol;$i++)        
  {$col_info = ibase_field_info($result, $i);
   $tipo[]=$col_info['type'];
  }
 echo " <table align=\"center\" border=\"1\" background=\"images/fundo_blue_02.gif\">\n";
 $count=0; 
 while ($row = ibase_fetch_object($result))
  {echo " <TR>\n";
   $values="";
   for($i=0;$i<$ncol;$i++)        
    {$col_info = ibase_field_info($result, $i);
     if($tipo[$i]=='BLOB')
      {$conteudo=$row->$col_info[0];
/* 
       $blob   = ibase_blob_info($row->$col_info['name']);
       $handle = ibase_blob_open($row-$col_info['name']);
       $conteudo=ibase_blob_get($handle, $blob[0]);
*/
      }   
     else   
       $conteudo=$row->$col_info['name'];	 
     echo "  <TD>$conteudo</TD>\n";
    }
   $count++; // $count=$count+1;
   echo "<td>$count - $insert$values)</td></TR>\n";
  }
 echo " </table>\n";
 ibase_free_result($result);
 ibase_close($connect); 
?>

Warning: ibase_blob_open() [function.ibase-blob-open]: String is not a BLOB ID in E:\Documents and Settings\magno\htdocs\cep\2.php on line 27

Warning: ibase_blob_get(): supplied argument is not a valid Interbase blob resource in E:\Documents and Settings\magno\htdocs\cep\2.php on line 28
  M 1 MARILENE RODRIGUES CHANG AP
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC