develooper Front page | perl.dbi.users | Postings from July 2006

Using DBD::ODBC in a CGI script under Apache

Thread Next
From:
scarmalt
Date:
July 6, 2006 10:45
Subject:
Using DBD::ODBC in a CGI script under Apache
Message ID:
OF80C2E8DC.D4A657C6-ONC12571A3.0060887E-C12571A3.00618245@iec.ch
I'm having a problem getting DBD::ODBC to work when invoked from a cgi 
script (running under Apache).

Specifics ---

I have a test program which can be called from two different "drivers". 
One is run from the command prompt:

   >perl  test_sql_flat.pl

The other from cgi script

   http://development.server.in-house/cgi-bin/test_sql_page.pl

These scripts call a common module to do a simple DBI   SELECT test.

The common module can be configured to use either an ODBC interface or an 
Oracle interface.

Both work without problems when launched from the command prompt after 
logging in as the web user.
But when invoked from a cgi setting, only the Oracle request works;  the 
ODBC returns

   DBI connect('db2adrs','odbcread',...) failed: Specified driver could 
not be loaded (SQL-IM003)(DBD: db_login/SQLConnect err=-1) 

Any suggestions on how to fix this will be most welcome.

Thanks and regards,
Sam Carmalt

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About