From: jkaufman at wamnetgov dot com
Operating system: Mandrake 9.1
PHP version: 4.3.3
PHP Bug Type: Informix related
Bug description: lvarchar not recognized
Description:
------------
Perhaps I have something misconfigured, but I discovered that doing a
fetchInto after a query that retrieves a field that is defined as
'lvarchar 1000' causes PHP to die.
Looking at ext/ifx.ec near line 1732, I see this:
$ifdef HAVE_IFX_IUS;
ifx_int8_t int8_var;
lvarchar *lvar_tmp;
$endif;
The compiled code in ifx.c has this:
#line 1733 "/usr/src/php-4.3.3/ext/informix/ifx.ec"
ifx_int8_t int8_var;
#line 1734 "/usr/src/php-4.3.3/ext/informix/ifx.ec"
void *lvar_tmp = 0;
To me, this looks like the system understands 'ifx_int8_t' as a datatype,
but doesn't understand 'lvarchar'.
Reproduce code:
---------------
This is my code:
// Get status updates
$sql = "select * from dmm_status ";
$sql .= "where dmm_status_master_id=$recordno";
$res = $dbh->query($sql);
if (DB::isError($res)) {
die ($res->getDebugInfo() . " at line " . __line__ );
}
// Get the data. Will be 0+ rows.
while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {
$status_note[] = $row['dmm_status_notes'];
$status_date[] = $row['dmm_status_date'];
}
Table:
create table dmm_status(
dmm_status_id serial primary key,
dmm_status_master_id integer,
dmm_status_user_id integer,
dmm_status_date datetime year to minute,
dmm_status_notes lvarchar(1000)
) in appdbs
extent size 20000 next size 5000
lock mode row;
Expected result:
----------------
I expect to see data in the $status_note and $status_date arrays.
Actual result:
--------------
PHP exits, w/o any error message. This happens in DB/ifx.php in the
fetchInto routine:
if (!$row = @ifx_fetch_row($result, $rownum)) {
return null;
}
It never returns from the ifx_fetch_row instruction. I tried removing the
'@' sign, but still no error message.
--
Edit bug report at http://bugs.php.net/?id=26555&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26555&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26555&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26555&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26555&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26555&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26555&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26555&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26555&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26555&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26555&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26555&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26555&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26555&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26555&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26555&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26555&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26555&r=float