ID:               33837
 User updated by:  roland dot wintgen at t-online dot de
 Reported By:      roland dot wintgen at t-online dot de
-Status:           Feedback
+Status:           Open
 Bug Type:         Informix related
 Operating System: Linux
 PHP Version:      5CVS, 4CVS (2005-07-24)
 New Comment:

IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC1
Software Serial Number AAA#B000000


Previous Comments:
------------------------------------------------------------------------

[2005-07-24 16:28:54] [EMAIL PROTECTED]

What exactly is the output of this:

# $INFORMIXDIR/bin/esql -V



------------------------------------------------------------------------

[2005-07-24 14:13:41] roland dot wintgen at t-online dot de

with the latest snapshot php5-20050724103 the problem still exists.
phpinfo() shows an installed ESQL/C Version 2.90 whereas it should be
10.00.
Maybe it would help, not to test against the installed esql version but
the dbaccess version number. The change in config.m4 would be:
IFX_VERSION=[`$INFORMIXDIR/bin/dbaccess -V | grep "DB-Access Version" |
sed -ne '1 s/\(.*\)DB-Access Version \([0-9]*\)\.\([0-9]*\).*/\2\3/p'`]
this would give the correct version.
The Perl DBD::Informix developers still test against the esql version
but treat version numbers between 2.90 and 2.99 as the never released
version 9.60.

------------------------------------------------------------------------

[2005-07-24 01:04:35] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



------------------------------------------------------------------------

[2005-07-23 15:49:13] roland dot wintgen at t-online dot de

Description:
------------
After installing the current CSDK 2.90, some database functions using
blobs will produce core dumps. This is due to IBM changed the version
number for the installed CSDK. Whereas esql -V for 2.80 shows "IBM
Informix CSDK 2.80, IBM Informix-ESQL Version 9.52.UC1", 2.90 will show
"IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC1".
This leads to a problem in ext/informix/config.m4 where the installed
version is read into IFX_VERSION. This value is interpreted in
ext/informix/ifx.ec around line 3258 to workaround a bug in older
versions. Now, with the wrong version number this will not run properly
and tries to deallocate the blob space twice. The bug shows also for PHP
4.3.X and 5.X.X.


Reproduce code:
---------------
ifx_textasvarchar(0);
ifx_blobinfile_mode(0);

// storing BLOB into database
$conn_id = @ifx_connect("database", "user", "password") or die("error
connecting to database!");
$blob_id = @ifx_create_blob(1, 0, "This text will be stored as blob")
or die("error creating blob!");
$blob[] = $blob_id;
$query_id = @ifx_query("insert into blobtable (blob) values (?)",
$conn_id, $blob) or die("error executing sql statement!");
ifx_free_result($query_id);

// retrieving BLOB
$query_id = @ifx_query("select blob from blobtable", $conn_id) or
die("error executing sql statement!");
$row_id = @ifx_fetch_row($query_id) or die("error fetching row!");
$blob_id = @ifx_get_blob($row_id["blob"]) or die("error retrieving
blob!");
ifx_free_result($query_id);
ifx_close($conn_id);


Expected result:
----------------
The small piece of code will try to store a small text as blob in a
database table and retrieve it.

Actual result:
--------------
[Sat Jul 23 15:45:04 2005]  Script:  'ifx_blob_bug.php'
---------------------------------------
/usr/local/src/php-4.4.0/ext/informix/ifx.ec(3259) : Block 0x0977213C
status:
Beginning:      Overrun (magic=0x00000011, expected=0x7312F8DC)
      End:      Unknown




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33837&edit=1

Reply via email to