in reply to Re: Re: Perl/CGI/Oracle hangs when connecting
in thread Perl/CGI/Oracle hangs when connecting

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.

  • Comment on Re: Re: Re: Perl/CGI/Oracle hangs when connecting

Replies are listed 'Best First'.
Re: Re: Re: Re: Perl/CGI/Oracle hangs when connecting
by Anonymous Monk on Feb 21, 2004 at 04:44 UTC
    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

      Looks like it can't find "libclntsh.so.9.0" -- is that anywhere where LD_LIBRARY_PATH doesn't point to in your CGI environment? Is /oracle/lib readable/executable by everybody? Or is your CGI environment setting a chroot different from "/"? Try `ls /` and print the output.