Kbase P173965: ODBC connection from PHP to database fails with message:
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/24/2010 |
|
Status: Unverified
SYMPTOM(s):
ODBC connection from PHP to database fails with message:
*Warning*: odbc_connect() [function.odbc-connect ]: SQL error: [unixODBC][DataDirect][ODBC 20101
driver]1508, SQL state 60 in SQLConnect in */var/www/html/odbc/connect_progress.php* on line *2
FACT(s) (Environment):
Linux
odbc.ini contains the correct information
ODBCINI environment variable points to $DLC/odbc/odbc.ini
odbcinst.ini contains the correct information
ODBCINST environment variable points to $DLC/odbc/odbcinst.ini
Command ls -ultr $ODBCINI shows that odbc.ini file has been read
CAUSE:
odbc.ini and odbcinst.ini files have a Windows format since they were created in Windows and then transferred via FTP
FIX:
Format the files to be used in UNIX using the Linux commands:
dos2unix $ODBCINI
dos2unix $ODBCINST