How to connect PHP 7.2 to Informix DB?

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: egami, macek, gesf

Post Reply
Srele
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jan 22, 2018 12:29 pm

Mon Jan 22, 2018 12:42 pm

I have two server:
1. Ubuntu 14.04 server with PHP 5.5.9 (have root access)
2. Centos server with Informix DB (don't have console access only on DB)

I manage somehow to connect PHP 5 to Informix DB and it is working perfectly. But now I need to update PHP to newest version 7.2 and I have problems to compile PDO_INFORMIX extension.

My steps ware:
1. Update PHP to 7.2
2. Install php7.2-dev package
3. download latest Informix SDK
4. run phpize7.2 command in Informix directory
5. run ./configure --with-pdo-informix=/opt/informix --with-php-config=/usr/bin/php-config7.2 command
6. run make and make install commands with out errors
7. put "extension=pdo_informix.so" in pdo_informix.ini file in PHP config directory

But when I run php -v command I get this error:

Code: Select all

PHP Warning:  PHP Startup: pdo_informix: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20170718
These options need to match
 in Unknown on line 0
PHP 7.2.1-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jan 11 2018 22:52:58) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.2.1-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
Can anyone help me with this?

Srele
New php-forum User
New php-forum User
Posts: 2
Joined: Mon Jan 22, 2018 12:29 pm

Mon Jan 22, 2018 12:56 pm

OK, I found solution.
I was needed "make clean" command ;)

Post Reply