Hello,
Thank you for your information. I have tried it outside Apache.
The script works well when it is run by itself and if the user "nobody" has a correct
LD_LIBRARY_PATH.
Apache is started by the "root" user with a correct LD_LIBRARY_PATH and then the child
processes are run as "nobody" as specified in the httpd.conf file :
User nobody
Group nobody
It looks like the child process does not heritate the library path in its environment
when run inside Apache.
A normal perl script without "use Pg;" runs correctly in Apache
When using Pg, the error in Apache log is the following :
_____________
Can't load '/usr/local/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris/auto/Pg/Pg.so' for module Pg: ld.so.1:
/usr/local/perl-5.6.1/bin/perl: fatal: libssl.so.0.9.6: open failed: No such file or directory at
/usr/local/perl-5.6.1/lib/5.6.1/sun4-solaris/DynaLoader.pm line 206.
at /home/www/smada/private/cgi-bin/latestChanges.pl line 2
Compilation failed in require at /home/www/smada/private/cgi-bin/latestChanges.pl line 2.
BEGIN failed--compilation aborted at /home/www/smada/private/cgi-bin/latestChanges.pl line 2
-------------
François BELLIARD
FTR&D/DRHG/RSCL
"Nigel J. Andrews" wrote:
>
> OK, so if you use the Pg module outside of Apache, i.e. just in a normal
> perl
> script, do you get the same error or can the module be found?
>
> [I'm sorry, I see I snipped some of your original posting and I can't
> remember
> if you've already effectively answered this by saying it worked until
> you
> started using SSL]
>
> --
> Nigel J. Andrews
> Director
>
> ---
> Logictree Systems Limited
> Computer Consultants
>
> On Thu, 18 Apr 2002, BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL wrote:
>
> > The web server is not chrooted and when Apache is started, the
> > LD_LIBRARY_PATH variable points to all the directories containing the
> > libraries
> >
> >
> > "Nigel J. Andrews" wrote:
> >
> > On Wed, 17 Apr 2002, Morten Sickel wrote:
> >
> > > BELLIARD Francois wrote:
> > > [Snip]
> > > >When a Perl Cgi script tries to load the "Pg" module (use Pg; in
> > the
> > > script),
> > > >there is the following error in the Apache Error Log :
> > > [Snip]
> > >
> > > I cannot find any 'Pg' module at CPAN, but if you are using the
> > DBD-Pg, you
> > > are not supposed to have any 'use Pg;' in your code, but rather
> > > use DBI;
> >
> >
> > Or of course he could be using the Pg module :)
> >
> >
> > As for the problem of not finding the library file. You say they
> exist,
> > you
> > presumably have checked they exist at the paths in the root filesystem
>
> > the
> > error message mentions. Is your web server/cgi-bin program running in
> a
> > chroot
> > box?
> >
> >
> >
--