I have a php app that uses PDO extensively and have a new client that has informix. Previously we used php 5.2 without any problems but switching to PHP 5.3 is unavoidable so:
Anybody has found out a way of using php_pdo_informix on php5.3 or is it completely obsolete and I must find another alternative?
This is needed for our test environments (CentOS) but developers currently work on windows we have a similar problem. There is a php_pdo_informix.dll but it is compiled against php5.2 and refuses to load on php5.3
Does anybody have a dll for php5.3?
Thx
I’ve already tried:
$ sudo pecl install pdo_informix
pecl.php.net is using a unsupported protocol - This should never happen.
pecl/PDO_INFORMIX requires package "pear/PDO"
No valid packages found
install failed
or
pecl install --alldeps pdo_informix
shows that it depends on pear/PDO but it has been deprecated in 5.3
and with explicit versions 1.2.6 , 1.2.7 to no avail
Even if I try to install pear/PDO it fails with many errors which is expected as there are many API changes in PHP that break.
This kind of errors appear when trying to install pdo beforehand: (some lines ommitted)
$ sudo pecl install pdo
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
<...more lines ...>
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_instantiate':
/tmp/pear/temp/PDO/pdo_dbh.c:410:8: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c:411:8: error: 'zval' has no member named 'is_ref'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_stmt_construct':
/tmp/pear/temp/PDO/pdo_dbh.c:435:6: error: 'zend_fcall_info' has no member named 'object_pp'
/tmp/pear/temp/PDO/pdo_dbh.c:458:6: error: 'zend_fcall_info_cache' has no member named 'object_pp'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_setAttribute':
/tmp/pear/temp/PDO/pdo_dbh.c:752:12: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'zim_PDO_getAttribute':
/tmp/pear/temp/PDO/pdo_dbh.c:818:28: error: 'zval' has no member named 'refcount'
/tmp/pear/temp/PDO/pdo_dbh.c: In function 'pdo_hash_methods':
/tmp/pear/temp/PDO/pdo_dbh.c:1122:24: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/pear/temp/PDO/pdo_dbh.c:1126:20: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
make: *** [pdo_dbh.lo] Error 1
ERROR: `make' failed
If I try to install a specific pdo_informix version I get this output:
pecl install --alldeps http://pecl.php.net/get/PDO_INFORMIX-1.2.6.tgz
downloading PDO_INFORMIX-1.2.6.tgz ...
Starting to download PDO_INFORMIX-1.2.6.tgz (65,676 bytes)
.................done: 65,676 bytes
WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php- src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
...done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
<more lines>
<same output as above>
You need to compile the module. Official link:
A step-by-step how-to guide to install, configure, and test a Linux, Apache, Informix, and PHP server
Original answer by: @user1998717