Mac OS X Snow Leopard: Informix IDS 11.5 + PHP 5.3

Ho appena inaugurato sul mio Blog DeveloperWorks di IBM il primo articolo della serie Informix che troverete all’indirizzo: https://www.ibm.com/developerworks/mydeveloperworks/blogs/amusarra/entry/mac_os_x_snow_leopard_informix_ids_11_5_php_5_31?lang=en-us.

L’articolo è disponibile in formato PDF nelle lingue italiano e inglese:

Con questo articolo spero di aver fatto cosa gradita a coloro che amano lavorare con il proprio Mac avendo a disposione l’intero ambiente di sviluppo. A completamento del quadro manca la ciliegina sulla torta: Eclipse PDT (http://www.eclipse.org/pdt).

2 risposte a “Mac OS X Snow Leopard: Informix IDS 11.5 + PHP 5.3

  1. Hello Antonio,
    thank you for your post under
    https://www.ibm.com/developerworks/mydeveloperworks/blogs/amusarra/entry/mac_os_x_snow_leopard_informix_ids_11_5_php_5_31?lang=en-us.
    It was of great help to install informix on a new mac osx Snow Leopard SERVER 10.6.2
    It took a little since latest java updates of MacOS do not coorporate with IBM installer but at the end I found iif.11.50FC6TL.macosx64 which works fine with the latest java.

    However, my problem is, that with the way you (and I) installed informix for PHP 5.3. at least the following function behaves strange: ifx_textasvarchar(1) does not work as I would expect it.

    Instead of getting data from the database for “text” columns I get strings like “/private/var/tmp/blbhEHPXA” which looks like a pointer to a file which does not exist.

    I found a workaround:
    ifx_blobinfile_mode(1)
    ifx_textasvarchar(0)
    after the ifx_fetch_row
    $blobfile=ifx_get_blob($field_value);
    $data=`cat $blobfile`;

    I wonder, if you trapped into this as well and would have a better idea?

    Best regards, Peter

    • Hello Peter,
      I found the error you have indicated on other platforms like Linux / Unix, I think this is a bug. When I read BLOBs prefer to use PHP functions as informix ifx_blobinfile_mode (), ifx_get_blob (), as well as you indicated.

      I have not had time to verify the exact cause of the error (PHP module Infomix or Informix CSDK), you may use the tools Informix and DTrace to try to understand the problem.

      The error I get is:

      Can not fetch next row on cursor E [SQLSTATE=IX 000 SQLCODE=-461] (cursor0_1) in /Users/amusarra/Sites/InformixTest_A.php on line 12

      Bye,
      Antonio.

Lascia un Commento

Fill in your details below or click an icon to log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Log Out / Modifica )

Foto Twitter

You are commenting using your Twitter account. Log Out / Modifica )

Foto di Facebook

You are commenting using your Facebook account. Log Out / Modifica )

Connecting to %s