HELP: PHP with Informix - questions

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
martincrumlish
Forum Newbie
Posts: 13
Joined: Mon Oct 14, 2002 10:46 am

HELP: PHP with Informix - questions

Post by martincrumlish »

Hi,

I have a PHP 4.0.6 set up. i am not upgrading PHP at the moment. All of my existing apps are base don a mySQL DB however, some of the powers that be where i work have decided not to support mySQL and now I have to change everything across to informix.

The Informix DB is on a different server, what do I need to do to connect to it?

Do I just specify an ip address, username and password in the ifx_connect funtion or is there a special way that PHP needs to be set up? In the PHP/extensions directory php_ix.dll is already there
User avatar
puckeye
Forum Contributor
Posts: 105
Joined: Fri Dec 06, 2002 7:26 pm
Location: Joliette, QC, CA
Contact:

Post by puckeye »

The question here is have you actually tried to connect using an IP address, username and password?

If not why didn't you? I'd suggest you first try it and upon errors or faillure ask for help while sending the error message(s).

I personnaly don't know anything about Informix but I'd guess it'd be the way to go. And there's nothing like trial and error to actually learn how to do things.
thomaska
Forum Newbie
Posts: 5
Joined: Thu Jan 23, 2003 1:22 am

Post by thomaska »

You first have to install the informix client (download from ibm or informix.com) depending on your OS (Windows/Linux). All Steps are described there.
martincrumlish
Forum Newbie
Posts: 13
Joined: Mon Oct 14, 2002 10:46 am

Post by martincrumlish »

Hi,

Yes, i tried connecting using PHP's ifx functions first - didn't work.

however, I have now solved the problem. I downloaded the Client SDK and copied the .dll files from there to WINNT/SYSTEM32

I also had to use Setnet32 to set up the conenction and INFORMIXSERVER details etc, then when i connect in PHP I use dbname@name_of_connection_in_setnet

There is very little documentation on setting this up so its a lot of trial and error

Thanks for your help,
Martin
Post Reply