[unixODBC-support] Re : Problem between unixodbc and PHP5

Jean-Joseph YVON jj.yvon at dis-info.com
Wed Mar 28 09:34:20 BST 2012


Sorry i lose my brain yesterday, I have logs

The first error i seeing was :
PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/clients/client1/web1/web/test.php on line 11

Resolved  by adding this in my scrip
putenv("ODBCSYSINI=/etc/odbcinst.ini");
putenv("ODBCINI=/etc/odbc.ini");

And chmoded /etc/odbcinst.ini and odbc.ini to 777

And now the connection work

What the ideal chmod for /etc/odbcinst.ini and odbc.ini ?

Thanks for your help Nick, You have put me on the good direction.


Jean-Joseph YVON




More information about the unixODBC-support mailing list