in reply to Re^2: cannot use Crypt::GPG for CGI
in thread cannot use Crypt::GPG for CGI

Can't locate Crypt/GPG.pm in @INC

Compare @INC dumped from command line with @INC dumped from a CGI. You may need to add use lib "/some/where/"; to the CGI.

Also compare $^X in CGI and command line. Your CGI may run using a different perl. In that case, use lib makes things worse (mixing library paths of different perl versions).

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: cannot use Crypt::GPG for CGI
by opticalcarrier (Initiate) on Jun 15, 2016 at 15:01 UTC
    yes, i think you are on to something here. run from a web browser we get @INC
    /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_ +perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .
    perl path
    /usr/bin/perl
    where as from CLI, the @INC is
    p>/home/hostdemo/perl5/lib/perl5/5.10.1/x86_64-linux-thread-multi /hom +e/hostdemo/perl5/lib/perl5/5.10.1 /home/hostdemo/perl5/lib/perl5/x86_ +64-linux-thread-multi /home/hostdemo/perl5/lib/perl5/5.10.0 /home/hos +tdemo/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 / +usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/p +erl5 /usr/share/perl5
    path
    /usr/bin/perl
    and the module itself is in
    /home/hostdemo/perl/usr/lib/perl5/Crypt/GPG.pm

    so while we are good with the perl path it doe look like the @INC on the web server doesnt have a path to my module

    and so i found out godaddy has a fix, i just had to add use cPanelUserConfig; in there to resolve the private libs.

    thanks!!!!