tip: in fedora 16 you must set INFORMIXDIR in /etc/sysconfig/httpd
Informix Functions (PDO_INFORMIX)
PDO_INFORMIX is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to Informix databases.
To build the PDO_INFORMIX extension, the Informix Client SDK 2.81 UC1 or higher must be installed on the same system as PHP. The Informix Client SDK is available from the » IBM Informix Support Site.
PDO_INFORMIX is a » PECL extension, so follow the instructions in Installation of PECL extensions to install the PDO_INFORMIX extension. Issue the configure command to point to the location of your Informix Client SDK header files and libraries as follows:
bash$ ./configure --with-pdo-informix=/path/to/SDK[,shared]
PDO_INFORMIX supports scrollable cursors; however, they are not enabled
by default. To enable scrollable cursor support, you must either set
ENABLESCROLLABLECURSORS=1 in the corresponding ODBC
connection settings in odbc.ini or pass
EnableScrollableCursors=1 clause in the DSN
- PDO_INFORMIX DSN — Connecting to Informix databases
I've just built PHP 5.2.11 with pdo_informix support on Slackware 13.0. I had to use the following options in order to disable pdo from being compiled in (notice the difference in the --without-pdo-sqlite option from previous post):
--disable-pdo option --without-pdo-sqlite option
I also could not use the --with-sigchild option which caused problems with phpize.
This fixed the informix -11001 error that I was getting. I was also getting an informix -23101 error (something about locale mismatches), but it was because I was not completely removing the compiled in pdo support.
I then had to;
rm -rf /usr/lib/php/.channels
pecl install --alldeps pdo_informix pdo_mysql pdo_sqlite.
There were other, smaller issues, but that is the lion's share.
I noticed that SQLite is installed by php by default...oh and it happens to use PDO. So dont forget to use --without-sqlite.
My successful config looks like this:
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --with-curl --with-xsl --disable-pdo --without-sqlite
Solved the issue with PHP 5.2.4 and others.
The embedded PDO in php since 5.1+ is INCOMPATIBLE with the latest PDO_MYSQL and PDO_INFORMIX, etc. I just spent 2 days working on this. This solution works on numerous versions of Linux I've tried as well as SunOS and HPUX.
The basic issue, getting this message when running PHP with PDO and trying
to get PDO_INFORMIX working, but having a version conflict:
"PHP Fatal error: PDO: driver informix requires PDO API version 20060409;
this is PDO version 20060511 in Unknown on line 0"
The "embedded" PDO that is within PHP since version 5.1 CONFLICTS with the
PDO the PEAR/PECL modules are expecting.
1) Rebuild PHP with no pdo (--disable-pdo) (and you can't have
any stuff like --with-mysql-pdo, either)
2) Then use PEAR/PECL to install PDO: pear install pdo
3) then use PEAR/PECL to install PDO_INFORMIX:
pear install --alldeps pdo_informix
4) make sure your php.ini extensions_dir points to the directory
where these are placed
5) then add these references to php.ini:
6) run php -v now and you should not see any errors.
7) run "pear list" and "pecl list" to see the installed modules
8) run php -i |egrep "pdo|PDO" to see:
php -i |egrep "pdo|PDO"
Configure Command => './configure' '--disable-pdo'
'--enable-force-cgi-redirect' '--with-gd' '--with-jpeg-dir=/usr/lib'
'--with-zlib' '--enable-bcmath' '--enable-mbstring=all' '--with-curl'
PDO support => enabled
PDO drivers => mysql, informix
pdo_informix support => enabled
PDO Driver for MySQL, client library version => 5.0.51a
I would have tried the embedded PDO and then also --with-informix-pdo=shared but as an earlier post here showed, the --with-informix... is unknown. Please correct my mistake if I am mistyping it.