1

I am trying to connect to an Informix db remotely via php7.0 I've found the driver https://pecl.php.net/package/PDO_INFORMIX/1.3.3

Downloaded the .tar.gz. and extracted it. Prepped the php files via phpize and ran ./configure as explained in:

http://php.net/manual/en/ref.pdo-informix.php

However, it crashes with the following error:

checking for PDO includes... configure: error: Cannot find php_pdo_driver.h.

I know that PDO has been a core PHP lib for a while and probably the C header file is named differently than the one referenced in the lib.

Any ideas where to go from here? It's been a very rough day. Installing the Informix SDK is a nightmare for itself anyway. Can't even find the installation dir.

1 Answer 1

2

The Informix SDK has been carefully and specifically designed by IBM to ruin your day.

  • The whole set lives under /opt/IBM/informix by default
  • Add /opt/IBM/informix/lib/cli and /opt/IBM/informix/lib/esql to your dynamic linker lookup paths. On Fedora you can do this by putting them in a new file /etc/ld.so.conf.d/informix.conf
  • You need to set the environment variable INFORMIXDIR. On Fedora you may add a new file /etc/profile.d/informix.sh and add export INFORMIXDIR=/opt/IBM/informix
  • Edit /opt/IBM/informix/etc/sqlhosts and put your basic connection information there. In the most simple case it has only one line that reads YOUR_SERVER_NAME\tonsoctcp\tYOUR_DB_NAME\tpdap-np. Note that pdap-np is actually port 1526 which is also the Informix "Turbo"-Driver tcp port. See your /etc/services.
  • Get the environment-changes going, e.g. by a reboot if you did them globally.
  • I can't remember the include-dir but you probably need /opt/IBM/informix/include in your CFLAGS's -I
Sign up to request clarification or add additional context in comments.

3 Comments

Haven't really gotten that far yet :) At the moment I'm still having issues installing the CSDK. I'm getting errors saying I don't have the appropriate Java version, yet I've updated all sys libs. Installing the PDO_INFORMIX for php can't be done without the CSDK, so I haven't even bothered with it yet. The CSDK takes up a lot of space o_o. Do you perhaps know what I have to do to get the appropriate java version for the csdk? I'm running on Ubuntu
I can't tell. But the CSDK's installation program comes with a bundled Java interpreter that should get used automatically - maybe if you deinstall / hide your system-java, you can get it to work
Thanks for the help I'll try that :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.