Results 1 to 6 of 6

Thread: PHP - Problems

  1. #1
    Join Date
    Oct 2003
    Posts
    3

    Unanswered: PHP - Problems

    Hi!

    I need to access an Informix database from a Linux Apache PHP system.
    I uses the following code

    $conn_id = ifx_connect ("db@server: port","user","pass");

    but I get ther following ERROR:

    Warning: ifx_connect(): E [SQLSTATE=IX 000 SQLCODE=-25556] in /srv/www/htdocs/www1/ifx.php on line 8

    what is the right format I have to write in the sqlhosts -file?

    thanx
    MySven

  2. #2
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: PHP - Problems

    Originally posted by MySven
    Hi!

    I need to access an Informix database from a Linux Apache PHP system.
    I uses the following code

    $conn_id = ifx_connect ("db@server: port","user","pass");

    but I get ther following ERROR:

    Warning: ifx_connect(): E [SQLSTATE=IX 000 SQLCODE=-25556] in /srv/www/htdocs/www1/ifx.php on line 8

    what is the right format I have to write in the sqlhosts -file?

    thanx
    MySven
    Hi,

    In $INFORMIXDIR/etc/..., this sqlhosts files, the format is the following one:

    Instance name Type of connection Server Service
    $INFORMIXSERVER onsoc[tcp|tli|str] Server name Xservice

    In /etc/services must be:

    Xservice nnnn/tcp

    Now, test the environmen variable INFORMIXSQLHOSTS, INFORMIXDIR, INFORMIXSERVER, ONCONFIG.

    Gustavo.

  3. #3
    Join Date
    Oct 2003
    Posts
    3
    thanks!
    How can I select the database on the server?

    MySven

  4. #4
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    With the sql 'database xxx' statement.
    rws

  5. #5
    Join Date
    Oct 2003
    Posts
    3

    Re: PHP - Problems

    Originally posted by gurey
    Now, test the environmen variable INFORMIXSQLHOSTS, INFORMIXDIR, INFORMIXSERVER, ONCONFIG.

    What must be in the INFORMIXSQLHOSTS and ONCONFIG Variable?

    the INFORMIXDIR = /opt/informix
    the INFORMIXSERVER = servername

  6. #6
    Join Date
    Aug 2003
    Location
    Argentina
    Posts
    780

    Re: PHP - Problems

    Originally posted by MySven
    What must be in the INFORMIXSQLHOSTS and ONCONFIG Variable?

    the INFORMIXDIR = /opt/informix
    the INFORMIXSERVER = servername
    Hi,

    The variable INFORMIXSQLHOSTS one talks about the way where this the file sqlhosts.
    Ej. INFORMIXSQLHOSTS=$INFORMIXDIR/etc/you_sqlhosts_file

    you_sqlhosts_file -- FORMAT --

    DBSERVERNAME type conexion HOSTNAME service

    Gustavo.

Posting Permissions

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