in reply to Perl/CGI/Oracle hangs when connecting

It'd be interesting what this Internal Server Error is about. Since you don't have access to the logs, use

use CGI::Carp qw(fatalsToBrowser);

in your script and error messages will show in the browser.

Replies are listed 'Best First'.
Re: Re: Perl/CGI/Oracle hangs when connecting
by Anonymous Monk on Feb 21, 2004 at 00:11 UTC
    That gave output. It can't load Oracle.so (which where it says it's looking), libclntsh.so.9.0 (which is somewhere), or DynaLoader.pm (which is NOT where it's looking). What does this mean? Matt
      Check if the shell environment variable LD_LIBRARY_PATH is set the same in both environments (cmd line vs. CGI). If not, try adding

      BEGIN { $ENV{LD_LIBRARY_PATH} .= ":dir/where/your/.so/is"; }

      to your CGI script. Oh, and check if the web server user (nobody usually) has access to the *.so file.

        But it was already using the fully qualified path, so does it matter if it's in LD_LIBRARY_PATH? In any event, I've added the code to set the LD_LIBRARY_PATH, which now includes the location of Oracle.so and everything that's in my login's LD_LIBRARY_PATH. (It's now printed at the top of the script.) The permissions already allow everyone to read and execute libclntsh.so, and I've now turned on execution for Oracle.so:

        sales% ls -l /homedir/is/mjohnson/lib5/sun4-solaris/auto/DBD/Oracle/Or +acle.so -r-xr-xr-x 1 mjohnson is 130316 Feb 20 17:10 /homedir/is/mjoh +nson/lib5/sun4-solaris/auto/DBD/Oracle/Oracle.so sales% ls -l /oracle/lib/libclntsh* lrwxrwxrwx 1 oracle dba 16 Aug 9 2002 /oracle/lib/libc +lntsh.so -> libclntsh.so.9.0 -rwxr-xr-x 1 oracle dba 15202072 Aug 9 2002 /oracle/lib/lib +clntsh.so.9.0
        Is there some other permission that has to be set for nobody?

        Is DynaLoader.pm (which I haven't found) the underlying problem?

        Thanks for the responses...

        Matt