Informix is a real dog to figure out because of the stupid names used for variables. After struggling for ages I figured it out....
I was connecting to an Informix SE 5.07 db.
INFORMIXSERVER is the first column of the entry in the sqlhosts file NOT the IP or name of the server.
INFORMIXHOME is the base directory of the client installation eg. /opt/informix
Set these variables in /etc/profile and PassEnv them in your Apache httpd.conf file to php.
My connect string is like this:
ifx_connect("/home/cserver/cdb/csdb@local_se, "user", "pass")
The /home/cserver/cdb/csdb is the path to the db file.
local_se is the same as INFORMIXSERVER
I hope this helps some people since the Informix documentation really sucks.