Informix and PHP
Posted in 2000
Topics: Installation, Setup & Upgrades, Platform-Specific Issues
I have an Informix DS 7.3 running on a Windows NT 4.0 Server and I want to connect to it using PHP installed on a Linux Machine (Red Hat 6.0, Apache 1.3.12, PHP 4.0RC1). I have downloaded and installed Informix Client SDK for Linux V2.40 an compiled PHP with Informix support enabled. How can I setup the server name (IP address or whatever) of the NT machine I want to connect to ? Should this be done in the PHP ifx_connect function ? Please help. Pedro Arinto Sent via Deja.com http://www.deja.com/ Before you buy.
>>>>> "arinto" ( arinto ) writes: arinto> I have an Informix DS 7.3 running on a Windows NT 4.0 Server and I arinto> want to connect to it using PHP installed on a Linux Machine (Red arinto> Hat 6.0, Apache 1.3.12, PHP 4.0RC1). I have downloaded and arinto> installed Informix Client SDK for Linux V2.40 an compiled PHP with arinto> Informix support enabled. How can I setup the server name (IP arinto> address or whatever) of the NT machine I want to connect to ? arinto> Should this be done in the PHP ifx_connect function ? Please help. Yes, you can use it. You need use name of database server. For exmaple, on machine named, say 'pc', server may have name 'ol_pc'(you can look at file $INFORMIXDIR/oncongif.$SERVERNAME) and have database 'database'. In such case connection string is: $db_handler = ifx_connect('database@ol_pc', 'username', 'password'); If you can establish connection using, say esqlc or DBD::Informix, PHP must work too (at least PHP3 works). And of course, you don't need use IP address since it points only to machine, not to database server. arinto> Pedro Arinto arinto> Sent via Deja.com http://www.deja.com/ Before you buy. -- Best regards, Sviatoslav.