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

Nick Gorham nick.gorham at easysoft.com
Fri Jun 13 15:31:45 BST 2008


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!!
>
> <br>SELECT DATA_, NOTE_TAG, DP_TAG, DP_TYP, FLAG, NOTE_TYP, OPERATOR, 
> 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.

-- 
Nick Gorham
Easysoft Limited
http://www.easysoft.com, http://www.unixODBC.org




More information about the unixODBC-support mailing list