Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id EAA37475C6E for ; Wed, 15 May 2002 05:47:30 -0400 (EDT) Received: from p-mail2.rd.francetelecom.com (p-mail2.rd.francetelecom.com [193.49.124.32]) by postgresql.org (Postfix) with SMTP id 17F4C475DE9 for ; Wed, 15 May 2002 05:45:08 -0400 (EDT) Received: by p-voyageur.rd.francetelecom.fr with Internet Mail Service (5.5.2655.55) id ; Wed, 15 May 2002 11:05:47 +0200 Received: from rd.francetelecom.com (lsun251.rd.francetelecom.fr [10.193.21.11]) by p-grive.rd.francetelecom.fr with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id K8CNCZ50; Wed, 15 May 2002 11:05:41 +0200 Message-ID: <3CE224E4.7E57D6DE@rd.francetelecom.com> Date: Wed, 15 May 2002 11:05:40 +0200 From: "BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL" Organization: FT.BD/FTRD/DRHG/RSCL X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: "Nigel J. Andrews" , pgsql-admin@postgresql.org Subject: Re: problem in module Pg with Apache, Perl and SSL References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200205/126 X-Sequence-Number: 4301 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? > > > > > > --