Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2005
    Posts
    5

    Unhappy Unanswered: Informix remote connect with php

    Hi,

    I have an apache server with php on a windows xp machine and a Informix database installed on a Linux machine. With php I want to connect to the Informix database with ifx_connect(). Which settings are to be made for this? Particularly, I don't know where the ip-adress of the Linux machine is set on the windows machine. I hope anyone can help me.

  2. #2
    Join Date
    Dec 2005
    Posts
    5

    Unhappy Now I know which settings to make but it still doesn't work

    On the Linux machine (server) and the Windows machine (client) I edited the etc/hosts and the etc/services files and inserted the values for both machines. In the sqlhosts file on the Linux machine I added a line with the onsoctcp connection type. On the windows machine I added an analogous value in the registry. When I connect with ifx_connect() it happens nothing and after 30 seconds there is a error message:

    Warning: ifx_connect(): E [SQLSTATE=08 004 SQLCODE=-908] in ...
    Fatal error: Maximum execution time of 30 seconds exceeded in ...

    Does anyone know how to get this working?

  3. #3
    Join Date
    Apr 2005
    Posts
    5
    Hello jooman,

    how is your ifx_connect() setup, so what is inside as parameters?

    Maybe you can try to connect via TCP/IP between the Windows and the Linux machine?!

    Rgds
    Flori

  4. #4
    Join Date
    Dec 2005
    Posts
    5
    My ifx_connect() parameters are:

    database='test@ifx_server';
    user='informix';
    passwd='********';

    ifx_server is the name of the Informix server on the Linux machine. test is a database on this server.

    And yes, I have a tcp/ip connection between the two machines. When I call ifx_connect() you can see packets from the windows machine arriving on the linux machine on the port I have defined in etc/services. I seems that all the connection parameters are correct but Informix doesn't establish a remote connection.

  5. #5
    Join Date
    Dec 2005
    Posts
    5
    The problem has been fixed. It seems that there was something wrong with the Informix database.

    When I shut down the Informix Server and restarted with oninit there was an error with the shared memory initialization. I always had to call oninit -i to initialize the whole database. Then I could access the database with dbaccess.

    Now I changed some parameters in the onconfig file and now I'm able to restart the database with oninit. Also, the remote connect with php works fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •