Why can't my Perl CGI script find Oracle DBD?

DBD and Oracle Masters:

I have a Perl web application that behaves strangely. I use it to read some material from an Oracle database and report. I have version 11.1.0.6.0 of Oracle Instant Client installed. I work on WinXP and have the PATH environment variable set to the instant client. I have Apache2 for my web server.

Here's the problem: when I run the application from the command line, it works without crashing. However, when I run from http://127.0.0.1/cgi-bin/a.cgi , I get the following DB access error:

install_driver(Oracle) failed: Can't load 'C:/usr/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at C:/usr/lib/DynaLoader.pm line 202. at (eval 9) line 3

Intuition tells me a problem with resolution, but I'm not sure where to look further. Can someone shed some light on this? I would really appreciate any help.

Thanks, Saker Ghani

+5
source share
3 answers

The fact that the error shows the full .DLL path indicates that the system is not experiencing problems finding the DLL, so this confirms your theory that file permissions are a problem.

To check if this is really a permissions problem, try writing a trivial Perl CGI script that does nothing, but directly opens this particular .DLL file (with a normal call open) and tells whether it works or not.

+2
source

. , , "" "C:/usr/lib/auto/DBD/Oracle/Oracle.dll". , , , , Oracle Instant Client . , "Path", .

+1

, cgi perl " Install_driver (Oracle): " C:/Perl/lib/auto/DBD/Oracle/Oracle. dll ' DBD:: Oracle: load_file: C:/Perl/lib/DynaLoader.pm line 201 ".

Perl 5.10 Windows 2003 Server IIS 6.

The permission was to grant permissions to the Perl Everyone directory, as well as the Oracle Installation folder.

+1
source

All Articles