[unixODBC-support] Doing a SQLDriverConnect fails in Apache with Error 500: "Internal Server Error"

Miguel Rentes miguel.rentes at efacec.pt
Tue Jun 17 19:54:08 BST 2008

Hi Nick,

I've done more experiments on SQLDriverConnect and I would like to have 
you opinion (and everybody's opinion too) on the results I've encontered.

I've changed the third argument passed to SQLDriverConnect and changed 
from "DSN=SXDB;UID=scatex:PWD=Scatex;" to "DSN=DEFAULT;" and now I don't 
have the "Internal Server Error" when I run the .cgi within a web 
browser. But I don't get any results from the database either. Should it 
be enough to put "DSN=DEFAULT;"?  Should the driver load the system DSN  
definitions when I only specify "DSN=DEFAULT;"?

 From what I can see, the unixODBC driver can't load the system DSN 
(there's only one and it's SXDB) and can't get the definitions out of 
ODBCINSTINI file. Below are my odbc.ini and odbcinst.ini (each at 

- odbc.ini:

Application Attributes          = T
Attributes              = W
BatchAutocommitMode             = IfAllSuccessful
CloseCursor             = T
DisableDPM              = F
DisableMTS              = T
Driver          = ORACLE_ODBC_Driver_Linux_ora10g
DSN             = SXDB
EXECSchemaOpt           =
EXECSyntax              = T
Failover                = T
FailoverDelay           = 10
FailoverRetryCount              = 10
FetchBufferSize         = 64000
ForceWCHAR              = F
Lobs            = T
Longs           = T
MetadataIdDefault               = F
QueryTimeout            = T
ResultSets              = T
ServerName              = SXDB
SQLGetData extensions           = F
Translation DLL         =
Translation Option              = 0
UserID          = scatex

- odbcinst.ini:

Trace           = Yes
TraceFile               = /tmp/sql.log
ForceTrace              = Yes
Pooling         = Yes

Description             = Oracle 10g R2 ODBC Driver for Linux
Driver          = /home/oracle/oraHome1/lib/libsqora.so.10.1
Driver64                =
Setup           =
Setup64         =
UsageCount              = 1
CPTimeout               =
CPReuse         =

Is there any problem with these files?

I have also tried using SQLConnect instead of SQLDriverConnect but the 
results are the same.

Thanks in advance,

Miguel Rentes

More information about the unixODBC-support mailing list