user746167
user746167

Reputation: 51

Issue with Informix (ifx_connect)

Hi I have a problem after installed informix client sdk (Ref : http://www.debian-administration.org/article/651/Connect_to_Informix_using_PHP5_on_Lenny_x86_64)

OS : CentOS

Here is the .php file that i use to connect

$db_conn = ifx_connect("dbname@IPHost","user","pass");

There is some error here, Warning: ifx_connect() [function.ifx-connect]: E [SQLSTATE=IX 001 SQLCODE=-1829] in /var/www/html/index.php on line 5

is anyone know the solution ? Thanks

Upvotes: 2

Views: 1496

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 753455

The way you find more about errors from Informix is often:

$ finderr -1829
-1829   Cannot open file citoxmsg.pam.

The file citoxmsg.pam is missing from the directory $INFORMIXDIR/msg.

If this error occurs, note all circumstances and contact IBM Technical Support.
$

(Give or take some blank lines.) The finderr command is found in $INFORMIXDIR/bin. You need $INFORMIXDIR set in the environment unless /usr/informix is correct - it could be a symlink to the actual software directory.

There are two possibilities:

  1. You have not got INFORMIXDIR set in the environment when PHP is run, and/or the php.ini file does not define a value for $INFORMIXDIR, or the value is set incorrectly, or a default (quite possibly /usr/informix) is being used but the software is not installed there.
  2. The installation is not complete - the relevant message file is missing as noted.

Of the two, I think reason 1 is much the more likely.

The IX001 value for SQLSTATE is of minimal use - it is the generic 'something went wrong with Informix' message. The SQLCODE is much more significant and helpful.

Upvotes: 3

Related Questions