php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33837 ESQL Version numbering schema changed
Submitted: 2005-07-23 15:49 UTC Modified: 2005-07-29 21:43 UTC
From: roland dot wintgen at t-online dot de Assigned:
Status: Closed Package: Informix related
PHP Version: 5CVS, 4CVS (2005-07-24) OS: Linux
Private report: No CVE-ID: None
 [2005-07-23 15:49 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-24 01:04 UTC] sniper@php.net
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-24 14:13 UTC] 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 16:28 UTC] sniper@php.net
What exactly is the output of this:

# $INFORMIXDIR/bin/esql -V


 [2005-07-24 17:57 UTC] roland dot wintgen at t-online dot de
IBM Informix CSDK Version 2.90, IBM Informix-ESQL Version 2.90.UC1
Software Serial Number AAA#B000000
 [2005-07-29 21:43 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 08:01:29 2024 UTC