If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > PHP - Problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-16-03, 07:57
MySven MySven is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
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
Reply With Quote
  #2 (permalink)  
Old 10-16-03, 08:28
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: PHP - Problems

Quote:
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.
Reply With Quote
  #3 (permalink)  
Old 10-17-03, 04:25
MySven MySven is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
thanks!
How can I select the database on the server?

MySven
Reply With Quote
  #4 (permalink)  
Old 10-23-03, 14:36
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
With the sql 'database xxx' statement.
__________________
rws
Reply With Quote
  #5 (permalink)  
Old 10-29-03, 07:24
MySven MySven is offline
Registered User
 
Join Date: Oct 2003
Posts: 3
Re: PHP - Problems

Quote:
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
Reply With Quote
  #6 (permalink)  
Old 10-29-03, 09:57
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Re: PHP - Problems

Quote:
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On