From fb001@rd.francetelecom.com Wed Apr 17 15:32:14 2002 Received: from p-mail1.rd.francetelecom.com (p-mail1.rd.francetelecom.com [193.49.124.31]) by postgresql.org (Postfix) with SMTP id BEF314759BA for ; Wed, 17 Apr 2002 11:32:14 -0400 (EDT) Received: by p-biset.rd.francetelecom.fr with Internet Mail Service (5.5.2655.55) id <2X2P61TR>; Wed, 17 Apr 2002 17:32:03 +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 2GC6TBM6; Wed, 17 Apr 2002 17:31:56 +0200 Message-ID: <3CBD957A.E006A609@rd.francetelecom.com> Date: Wed, 17 Apr 2002 17:32:10 +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: pgsql-admin@postgresql.org Subject: problem in module Pg with Apache, Perl and SSL Content-Type: multipart/alternative; boundary="------------B7CF7B1EEA31B3B31FCCB82B" X-Archive-Number: 200204/161 X-Sequence-Number: 4049 --------------B7CF7B1EEA31B3B31FCCB82B Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello I have installed Postgresql on a Solaris8 Server with: - Apache 1.3.23, - mod_ssl-2.8.7-1.3.23 - openSSL 0.9.6c, - PERL 5.6.1 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 : 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 It looks like Perl is unable to load the module Pg for a reason that i don't understand. All the libraries and modules specified in the error message exist on the server disk. Is it a compilation or configuration problem ? Thank you for your help. -- François BELLIARD FTR&D/DRHG/RSCL - (33) (0)2 96 05 22 51 --------------B7CF7B1EEA31B3B31FCCB82B Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hello

I have installed Postgresql on a Solaris8 Server with:
    - Apache 1.3.23,
    - mod_ssl-2.8.7-1.3.23
    - openSSL 0.9.6c,
    - PERL 5.6.1

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 :

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

It looks like Perl is unable to load the module Pg for a reason that i don't understand.
All the libraries and modules specified in the error message exist on the server disk.
Is it a compilation or configuration problem ?
Thank you for your help.

-- 

François BELLIARD
FTR&D/DRHG/RSCL - (33) (0)2 96 05 22 51
  --------------B7CF7B1EEA31B3B31FCCB82B-- From Morten.Sickel@nrpa.no Wed Apr 17 15:46:44 2002 Received: from postix.nrpa.no (unknown [193.217.14.3]) by postgresql.org (Postfix) with ESMTP id 37A46475CE6 for ; Wed, 17 Apr 2002 11:46:44 -0400 (EDT) Message-ID: <54DE9A561AD20C4D9FF88B116965420E02A016@postix.nrpa.no> From: Morten Sickel To: "'BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL'" Cc: "Pgsql-Admin (E-post)" Subject: Re: problem in module Pg with Apache, Perl and SSL Date: Wed, 17 Apr 2002 17:46:01 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Archive-Number: 200204/162 X-Sequence-Number: 4050 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; and afterwards $dbh = DBI->connect("dbi:Pg:dbname=$dbname", $dbuser, $dbpass) (If you are using any other module, please have me excused, I am not using Solaris so I am not able to try to reproduce your error messages.) Best regards Morten -- Morten Sickel Norwegian Radiation Protection Authority From nandrews@investsystems.co.uk Wed Apr 17 16:02:29 2002 Received: from smtp.investsystems.co.uk (unknown [62.49.196.163]) by postgresql.org (Postfix) with SMTP id 5B019475A3E for ; Wed, 17 Apr 2002 12:02:29 -0400 (EDT) Received: (qmail 23465 invoked from network); 17 Apr 2002 16:02:33 -0000 Received: from ponder.fairway2k.co.uk (nandrews@172.31.1.3) by hex.fairway2k.co.uk with SMTP; 17 Apr 2002 16:02:33 -0000 Date: Wed, 17 Apr 2002 17:02:33 +0100 (BST) From: "Nigel J. Andrews" X-Sender: nandrews@ponder.fairway2k.co.uk To: "Pgsql-Admin (E-post)" Cc: "'BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL'" Subject: Re: problem in module Pg with Apache, Perl and SSL In-Reply-To: <54DE9A561AD20C4D9FF88B116965420E02A016@postix.nrpa.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200204/172 X-Sequence-Number: 4060 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? -- Nigel J. Andrews Director --- Logictree Systems Limited Computer Consultants From Morten.Sickel@nrpa.no Thu Apr 18 12:50:23 2002 Received: from postix.nrpa.no (unknown [193.217.14.3]) by postgresql.org (Postfix) with ESMTP id B893C476515 for ; Thu, 18 Apr 2002 08:50:23 -0400 (EDT) Message-ID: <54DE9A561AD20C4D9FF88B116965420E02A01F@postix.nrpa.no> From: Morten Sickel To: "'Nigel J. Andrews'" , "Pgsql-Admin (E-post)" Cc: "'BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL'" Subject: Re: problem in module Pg with Apache, Perl and SSL Date: Thu, 18 Apr 2002 14:49:39 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Archive-Number: 200204/175 X-Sequence-Number: 4063 > From: Nigel J. Andrews [mailto:nandrews@investsystems.co.uk] > Morten Sickel (I) wrote: >> I cannot find any 'Pg' module at CPAN, but if you are using the DBD-Pg... > Or of course he could be using the Pg module :) Oops, is there any? Sorry then, I searhed at cpan, withou finding any modules named just Pg... Morten From fb001@rd.francetelecom.com Thu Apr 18 14:48:13 2002 Received: from p-mail1.rd.francetelecom.com (p-mail1.rd.francetelecom.com [193.49.124.31]) by postgresql.org (Postfix) with SMTP id E9821475ACB for ; Thu, 18 Apr 2002 10:48:13 -0400 (EDT) Received: by p-biset.rd.francetelecom.fr with Internet Mail Service (5.5.2655.55) id ; Thu, 18 Apr 2002 16:37: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 2GC6T1Q1; Thu, 18 Apr 2002 16:37:43 +0200 Message-ID: <3CBEDA48.517244A2@rd.francetelecom.com> Date: Thu, 18 Apr 2002 16:38:00 +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" Cc: "Pgsql-Admin (E-post)" Subject: Re: problem in module Pg with Apache, Perl and SSL References: Content-Type: multipart/alternative; boundary="------------E80963B1C4F4AB035FB41E08" X-Archive-Number: 200204/177 X-Sequence-Number: 4065 --------------E80963B1C4F4AB035FB41E08 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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? -- Nigel J. Andrews Director --- Logictree Systems Limited Computer Consultants ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org -- François BELLIARD FTR&D/DRHG/RSCL - (33) (0)2 96 05 22 51 --------------E80963B1C4F4AB035FB41E08 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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?

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

-- 

François BELLIARD
FTR&D/DRHG/RSCL - (33) (0)2 96 05 22 51
  --------------E80963B1C4F4AB035FB41E08-- From jie@stbernard.com Thu Apr 18 14:44:05 2002 Received: from MAIL01.stbernard.com (mail01.stbernard.com [64.154.93.162]) by postgresql.org (Postfix) with ESMTP id ABFAD4762A3 for ; Thu, 18 Apr 2002 10:44:05 -0400 (EDT) Received: by MAIL01.stbernard.com with Internet Mail Service (5.5.2653.19) id ; Thu, 18 Apr 2002 07:44:10 -0700 Message-ID: <7C760DAA511DC74B99E7D22189F786F1906E08@MAIL01.stbernard.com> From: Jie Liang To: 'Morten Sickel' , "'Nigel J. Andrews'" , "Pgsql-Admin (E-post)" Cc: "'BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL'" Subject: Re: problem in module Pg with Apache, Perl and SSL Date: Thu, 18 Apr 2002 07:44:09 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Archive-Number: 200204/176 X-Sequence-Number: 4064 module/category current distrbution file Pg pgsql_perl5-1.9.0tar.gz -----Original Message----- From: Morten Sickel [mailto:Morten.Sickel@nrpa.no] Sent: Thursday, April 18, 2002 5:50 AM To: 'Nigel J. Andrews'; Pgsql-Admin (E-post) Cc: 'BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL' Subject: Re: [ADMIN] problem in module Pg with Apache, Perl and SSL > From: Nigel J. Andrews [mailto:nandrews@investsystems.co.uk] > Morten Sickel (I) wrote: >> I cannot find any 'Pg' module at CPAN, but if you are using the DBD-Pg... > Or of course he could be using the Pg module :) Oops, is there any? Sorry then, I searhed at cpan, withou finding any modules named just Pg... Morten ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) From fb001@rd.francetelecom.com Wed May 15 09:47:30 2002 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? > > > > > > -- From fb001@rd.francetelecom.com Thu May 16 14:36:19 2002 Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 021E4475B7F for ; Thu, 16 May 2002 10:36:19 -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 D5175475A15 for ; Thu, 16 May 2002 10:36:16 -0400 (EDT) Received: by p-voyageur.rd.francetelecom.fr with Internet Mail Service (5.5.2655.55) id ; Thu, 16 May 2002 16:19:10 +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 K8CNC9FR; Thu, 16 May 2002 16:19:07 +0200 Message-ID: <3CE3BFDD.9E9C0387@rd.francetelecom.com> Date: Thu, 16 May 2002 16:19:09 +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" , yves.guerin@muhc.mcgill.ca Cc: pgsql-admin@postgresql.org Subject: Re: problem in module Pg with Apache, Perl and SSL References: <3CE224E4.7E57D6DE@rd.francetelecom.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Archive-Number: 200205/141 X-Sequence-Number: 4316 Hello, I think my problem is resolved In the httpd.conf file, i put the following directives : PassEnv PATH PassEnv LD_LIBRARY_PATH and the error has disappeared. The "mod_env" module must be loaded in Apache for it works. Thank you for your help. Francois "BELLIARD Francois - FT.BD/FTRD/DRHG/RSCL" wrote: > > 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? > > > > > > > > > > > -- -- François BELLIARD FTR&D/DRHG/RSCL - (33) (0)2 96 05 22 51