Page 1 of 1

How to use Informix functions with PHP?

PostPosted: 27. April 2006 15:23
by blur
Hello,

Can someone point me to some tutorial or FAQ or give me some highlights on how to user the PHP Informix functions with XAMPP?

Thank you very much in advance,

Cheers

PostPosted: 27. April 2006 16:36
by Wiedmann
A good starting point might be the PHP manual:
http://de.php.net/manual/en/ref.ifx.php

BTW:
You have to enable this extension in "php.ini".

PostPosted: 27. April 2006 17:52
by blur
But the way to go would be to enable the extension on php.ini and recompile the XAMPP PHP module?

PostPosted: 28. April 2006 15:48
by blur
I've enabled the the extension on "php.ini" by removing the beginning semicolon on the line "extension=php_ifx.dll". I've restarted XAMPP, but I still get "Fatal error: Call to undefined function ifx_connect() in..." on a simple php page that defines an Informix connection.

What more is necessary to work?

Cheers

PostPosted: 28. April 2006 16:25
by Wiedmann
You can see this extension in phpinfo()?

PostPosted: 28. April 2006 17:35
by blur
Thank you all for your help. I've figured it out.

I was enabling the extension on the wrong php.bin. I had enabled it on C:\Program Files\XAMPP\xampp\php\php.ini and it should be C:\Program Files\XAMPP\xampp\apache\bin\php.ini

Now phpinfo() gives me output for the Informix extension.

But now I have another problem. I don't know where to set the INFORMIX environment variables and where to point them to. Can anyone help me out with this?

Cheers

PostPosted: 01. February 2007 23:35
by LeoGer1984
I have the same problem - I'm getting an error message
Code: Select all
E [SQLSTATE=IX 000 SQLCODE=-25560]
when calling ifx_connect.
According to IBM, the reason is that the INFORMIXSERVER variable is not set.

I activated ifx extension in PHP.ini and the extension properties are shown in phpinfo().

I added INFORMIXSERVER and INFORMIXDIR variables to:
    Windows' Path variable (no effect)
    PHP.ini (no effect)
    httpd.conf (at least the variables show up in phpinfo() output)


Can anyone please help me - I don't understand this.