go to bug id or search bugs for
If a table exists within Informix with a TEXT field (have
not tested BYTE fields) that has NULL data and that field is
selected, the ifx_fetch_row() call after the ifx_get_blob()
call causes a segmentation fault in Apache. If only one row
is retrieved, there the segmentaion fault does not occur. If
the first row HAS data in the TEXT field (ie IS NOT NULL)
then the segmentation fault does not occur. The segmentation
fault occurs in the second call to ifx_fetch_row() (assuming
ifx_get_blob is called on every row). This bug has been
around for a while (including in PHP 3.0). At one point I
sent the contents of ifx.c to the Informix folks, but since
ifx.c cannot be compiled and ran alone (it needs the rest of
PHP to function) they refused to use it as a sample. And I
don't know enough C to generate an example of my own. I am
uncertain if the problems lies within PHP's ifx.c or if it
is in the client side Informix libraries. I have seen this
problem with several version of the libraries including
those distributed with ODS 7.23.FC4 and those from the
latest SDK. My current ESQL/C version is: INFORMIX-ESQL
Version 9.30.FC1 (output from esql -V).
If you find the bug is in Informix Client libraries, and not
in PHP code... if you can give me a NON-PHP C code sample
reproducing this bug, I can properly report it to Informix
(we have a site wide support license here). Please email me
at firstname.lastname@example.org for more information.
Although it is rather difficult for me to perform a gdb
backtrace (as I would have to first build and install gdb
and then isolate the Apache process on a non-production
machines) I can do so if it will help get the bug fixed.
Just let me know.
As a workaround, currently, when I generate my blob to
insert or update I use this syntax:
$blobid = ifx_create_blob(1, 0, trim($data) . " ");
That space on the end ensures the field IS NOT NULL and
therefore stops the segmentation fault from ocurring.
Add a Patch
Add a Pull Request
Does this happen with latest CVS snapshot from http://snaps.php.net/ ?
No feedback. Closing.