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

Miguel Rentes miguel.rentes at efacec.pt
Fri Jun 13 16:16:32 BST 2008

Hi Nick,

LD_LIBRARY_PATH has "$ORACLE_HOME/lib:/usr/lib:/usr/local/lib" and 
running the .cgi as the user that also runs httpd (with the same 

I'm starting/stopping httpd as user root but the "User" directive in 
httpd.conf points to the user that runs .cgi with no problem. Is there 
any problem with starting/stopping httpd as user root? I'm doing so to 
be able to open port 80.

Best regards,

Miguel Rentes

Nick Gorham wrote:
> Miguel Rentes wrote:
>> Hi Nick,
>> If I run the .cgi from the command line I get the following output:
>> Content-Type: text/html
>> <html>
>> <head><link rel="stylesheet" href="../styles.css" 
>> type="text/css"><META HTTP-EQUIV="refresh" 
>> CONTENT="0;URL=../Notas_Entidades/print_not_ent.php"></head><body 
>> bgcolor="#CCCCCC" align="center" class="fText">
>> Debug: connect_odbc.c [connect_odbc] - ODBC string 
>> 'DSN=SXDB;UID=scatex;PWD=Scatex;'
>> SQL_HANDLE_ENV well allocated!!
>> SQL_HANDLE_DBC well allocated!!
>> SQLDriverConnect well done!!
>> note_file, flag FROM NOTETAG_OPERATION  WHERE  flag <> 'D'  AND  
>> dp_typ =''  AND  OPERATOR =''  ORDER BY DATA_
>> <br></body>
>> </html>
>> But when I run it from the web browser I get the "IM004" error. If 
>> there's a problem with the Apache environment, how can I find the 
>> cause? I have a .cgi that prints the environment variables under the 
>> Apache environment but I don't see any that could be missing. Besides 
>> the environment variables what can also be wrong with the Apache 
>> environment? I also thought about permissions but I can execute .cgi 
>> from the web browser, so I eliminated this possibility...
> Your library search path would be my bet, but other than that I don't 
> know.

More information about the unixODBC-support mailing list