Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Apache Perl Kaaboom (error 126)

Status
Not open for further replies.

kmowens

Programmer
Jul 15, 2004
5
US
I'm running activeperl 5.8 and Apache 2.0 on my windows 2000 machine. I'm trying to connect to an Oracle server on our network.

I'm seeing this error in my Apache log after I call a Perl script:
Specified driver could not be loaded due to system error 126 (Oracle ODBC).

When I call the Perl script from the command line (dos prompt), it kicks back the correct HTML and info it pulled from the DB. This proves I have the right lib's and that the code works. For some reason, when Apache calls the same script I get that error. I have the Apache service logging in as me. Can anyone help, this one seems insolvable?

Here is the short version of the code. I'm getting the error code from the exception catch on the DBI->connect call. And since this does run perfectly from the command line, I'm thinking it is a permission issue with the Apache service.

package OracleConnection;
use strict;
if (! eval "require DBI") {
die("It appears that the DBI module is not installed!");
}
...
$dbh = DBI->connect("dbi:ODBC:pROD",$username,$password)
|| die("CONNECT $!\n$DBI::errstr");

 
Sounds dodgy.

Maybe try Win32::ODBC see if you get the same error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top