it has been days (weeks ?) since I try to connect to an Informix SQL database with PHP but I can't make it work. I'm stuck with this error :
SQLSTATE=HY000, SQLDriverConnect: -329 [Random characters, ex :`�%] sqlerrm(systables)
I can make the link with Windows ODBC utility https://i.stack.imgur.com/1ChAL.png But impossible on PHP. I installed the informix drivers and the informix dll extension for php and run it like this:
putenv("INFORMIXDIR=C:\\informix");
try {
$db = new PDO("informix:host=iat-----; service=sqlexec; database=sige---; server=iat-----; protocol=sesoctcp;", "if----", "pass---");
} catch (Exception $e) {
echo('Erreur : ' . $e->getMessage() . '<br>');
}
Thank you for your kind help.
Error message -329 is:
It means that despite your best efforts, something is astray with the environment. Either you've misspelled the database name or the server name, or the database is not set up to allow the user access to the database, or something along those lines.
Much more than that, I can't help you with. You're on Windows, and I'm not. You can look at the SETNET32 settings, but the fact that you can connect via the Windows ODBC utility suggests that most of what you need should be OK.