chaski has asked for the wisdom of the Perl Monks concerning the following question:

I get the following message when I try to run a CGI program I have from the WEB... If I run it on the shell prompt everything is OK ... HELP PLEASE!
Install_driver(Oracle) failed: Can't load '/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBD/Oracle/Ora +cle.so' for module DBD::Oracle: ld.so.1: /usr/bin/perl: fatal: /u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0: Permission denied at /usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206. at (eval 6) line 3 Compilation failed in require at (eval 6) line 3. Perhaps a required shared library or dll isn't installed where expected at ./pruebacons line 73

edited: Tue Jan 21 15:33:13 2003 by jeffa - added code tags

Replies are listed 'Best First'.
Re: CGI + ORACLE problem
by Tanalis (Curate) on Jan 21, 2003 at 14:37 UTC
    I'd suggest that your DB library files/modules don't have the required permissons set to be accessed by the server - remember that all CGI scripts are generally run by nobody in nogroup.

    You can probably solve the problem by ensuring that the libraries and modules have at least read and execute permissions set for everybody.

    Hope that helps,
    -- Foxcub

    Update: Clarifications.

      I MODIFIED PERMISIONS AND NOW THIS IS WHAT IT SAYS : Can't locate DynaLoader.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 155. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/DBI.pm line 155. Compilation failed in require at ./pruebacons line 3. BEGIN failed--compilation aborted at ./pruebacons line 3. ANY IDEAS?
        I MODIFIED PERMISIONS AND NOW THIS IS WHAT IT SAYS : Can't locate DynaLoader.pm

        Whereas before you made this change, the message was:

        ... Permission denied at /usr/local/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 206...

        (and this path is mentioned in @INC, as cited in the later error message), which suggests that perl had found this file previously, and makes me wonder whether changing permissions was really all that happened between these two runs. If you do "ls" on the path mentioned for DynaLoader.pm in the OP, is that file still there?

        (Did you change permissions on this file: "/u01/app/oracle/product/8.1.6/lib/libclntsh.so.8.0", which seemed to be the source of the permission error in the OP? Did you verify global read/execute permission on all the intervening directories?)

        Sorry to be giving you more questions than help. Do you have non-cgi perl routines that access oracle on the webserver host, so you can isolate the problem to the "nobody" user?

Re: CGI + ORACLE problem
by OM_Zen (Scribe) on Jan 21, 2003 at 18:49 UTC
    Hi ,

    The files have to be tested for read executable bits