Posts Tagged ‘Informix’
I was working on a project which needs PHP talk to Informix database on Windows platform. After installed IBM Informix Client_SDK, included PHP extension php_ifx.dll, and use following command to connect to Informix:
$sync_link_id = ifx_connect($database, $username, $password);
I got following error:
[SQLSTATE=IX 000 SQLCODE=-25560]
If you check Informix document from IBM, you know Environment variable INFORMIXSERVER must be set. We know how to set up environment variable on Unix and Apache, but the question is how to set it up for IIS?
People may first think this could be environment variable on Windows as well. But this is wrong. Informix client is using Registry KEY on Windows platform. Here is the path on a 64bit machine.
Second, you should have your default server setup under KEY:
At here, you need to provide HOST, PROTOCOL and SERVICE, so php_ifx knows how to connect to your Informix server.
After set them up, PHP should be able to talk to Informix.