We need to access a InterSystems ODBC data source via php. The current default odbc driver is db2. Apache user can access datasource via isql on the command line using /etc/odbc.ini.
Does anyone have any recommendations?
This is what we have tried:
1) $conn = new PDO("odbc:DI01", "", ""); SQLSTATE[08001] SQLConnect: -1013 [IBM][CLI Driver] SQL1013N The database alias name or database name "DI01" could not be found. SQLSTATE=42705 .]
2) $di_conn_str = "DRIVER={InterSystems ODBC};FILEDSN=/etc/odbc.ini;SERVER=XXX.XXX.X.XX;DATABASE=YY;UID=;PWD=;"; $con = odbc_connect($di_conn_str, "", "")
3) $di_conn_str = "DRIVER={InterSystems ODBC};SERVER=XXX.XXX.X.XX;DATABASE=YY;UID=;PWD=;"; $con = odbc_connect($di_conn_str, "", "")
All result in PHP Warning: odbc_connect() [function.odbc-connect]: SQL error: [IBM][CLI Driver] CLI0124E Invalid argument value. SQLSTATE=S1009, SQL state S1009 in SQLConnect in testfile.php
TIA