Randy Kobes | 1 Jun 05:38 2009
Picon

Re: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

On Sat, May 30, 2009 at 10:49 AM, Mahesh Khambadkone
<mahesh <at> games2win.com> wrote:
> Hi,
>
> I followed instructions at
> http://perl.apache.org/docs/2.0/os/win32/install.html and
> http://perl.apache.org/docs/2.0/rename.html to install mod_perl on my
> configuration : Windows Vista, perl v5.10.0, ActivePerl 5.10.0 and Apache
> 2.3.
>
> I can run sample a sample Hello.pm using the following in my httpd.conf :
>
> PerlModule Apache2::Hello
> <Location /hello>
>             SetHandler modperl
>             PerlResponseHandler Apache2::Hello
> </Location>
>
> But, if I want to run old Perl CGI scripts by adding a block like the
> following, Apache throws an error “Can't load Perl module ModPerl::Registry
> for server XXX, so exiting ”.
>
> PerlModule ModPerl::Registry
> PerlSendHeader On
> <Directory /var/www/mkperl>
>      SetHandler perl-script
>     PerlHandler ModPerl::Registry
>     Options +ExecCGI
>     Order allow,deny
>     Allow from all
(Continue reading)

Mahesh Khambadkone | 1 Jun 07:32 2009

RE: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

The config sample you sent now allows my Apache to start-up, but I get an
error.

1)	The config sample I was using was taken from the mod_perl
Developer's Cookbook - Recipe 2.2 Using Apache Registry. I guess a lot of
the other examples there will be buggy !

2)	The new error I get is when the Perl script is actually run :

Can't load 'D:/Perl/site/lib/auto/Apache2/ServerUtil/ServerUtil.dll' for
module Apache2::ServerUtil: load_file:The specified procedure could not be
found at D:/Perl/lib/XSLoader.pm line 64.\n
at D:/Perl/site/lib/Apache2/XSLoader.pm line 31\n
Compilation failed in require at D:/Perl/site/lib/ModPerl/RegistryCooker.pm
line 30.\n
BEGIN failed--compilation aborted at
D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 30.\n
Compilation failed in require at (eval 6) line 3.\n
	...propagated at D:/Perl/lib/base.pm line 93.\n
BEGIN failed--compilation aborted at D:/Perl/site/lib/ModPerl/Registry.pm
line 26.\n
Compilation failed in require at (eval 5) line 3.\n

The ServerUtil.dll file does exist.

Is this a configuration issue to do with my version of Perl / ActivePerl and
Apache?

Regards,
Mahesh
(Continue reading)

Chris Brooks | 1 Jun 12:50 2009
Picon

Strange Apache error (appears to be related to bad pidfile)

Good morning,

I've had a strange problem with Apache twice in the past week, and I'm out of ideas as to what might be going on. 

Here's the background: I run a website that uses a plain-vanilla Apache server to serve images, and uses mod_proxy to forward requests for everything else to a backend mod_perl server on a different port on the same ip address.  (I think this scenario used to be documented here: http://perl.apache.org/docs/1.0/guide/install.html#Installation_Scenarios_for_mod_perl_and_Other_Components, but it doesn't appear to be there anymore.)

The problem that I ran into is that after running on the same configuration for years, and without a reboot for a month or so, the plain-vanilla Apache server  stopped serving requests. 

  • My first try was to execute apachectl stop and then apachectl start.  apachectl printed: "/usr/local/apache-light/bin/apachectl start: httpd started".  However, it wasn't running (which I verified by trying to run apachectl status and then apachectl stop).
  •  The first time this happened, I was running Apache 1.3.37.  I downloaded the tarball for Apache 1.3.41 and installed that in place of 1.3.37.  The second time this error occurred it occurred with 1.3.41.
  • No messages were written to the access_log or error_log 
  • /usr/local/apache-light/bin/apachectl configtest returned "Syntax OK"
  • apachectl points to the correct pidfile (at least it's the one specified in /usr/local/apache-light/conf/httpd.con), and it looks to me like root has perfectly reasonable rights to the pidfile.
I was eventually able to restart the apache process the first time by deleting the pidfile.  When I ran apachectl start without a pidfile, the apache process started up and ran without problems for 3 days.  The second time this happened, it wasn't enough to delete the pid file.  I again reinstalled apache, and went so far as to reboot the server.  (fsck did not find any errors on reboot.)  This time, I was only able to restart the sever after running the following:

[root <at> data2]# touch /usr/local/apache-light/logs/httpd.pid
[root <at> data2]# rm -f /usr/local/apache-light/logs/httpd.pid
[root <at> data2]# /usr/local/apache-light/bin/apachectl start

This finally worked, and the server has been serving requests for 3 days now.

Any ideas on what might be going on?  I'd love to have some ideas before this happens again -- it's been a stressful 45 minutes each time while I scrambled to try to figure out how to restart it.

Thanks!
-Chris







Randy Kobes | 1 Jun 16:24 2009
Picon

Re: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

On Mon, Jun 1, 2009 at 12:32 AM, Mahesh Khambadkone
<mahesh <at> games2win.com> wrote:
> The config sample you sent now allows my Apache to start-up, but I get an
> error.
>
> 1)      The config sample I was using was taken from the mod_perl
> Developer's Cookbook - Recipe 2.2 Using Apache Registry. I guess a lot of
> the other examples there will be buggy !

I don't think one can conclude they're buggy, as there's still
problems with your setup, as described below.

> 2)      The new error I get is when the Perl script is actually run :
>
> Can't load 'D:/Perl/site/lib/auto/Apache2/ServerUtil/ServerUtil.dll' for
> module Apache2::ServerUtil: load_file:The specified procedure could not be
> found at D:/Perl/lib/XSLoader.pm line 64.\n
> at D:/Perl/site/lib/Apache2/XSLoader.pm line 31\n
> Compilation failed in require at D:/Perl/site/lib/ModPerl/RegistryCooker.pm
> line 30.\n
> BEGIN failed--compilation aborted at
> D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 30.\n
> Compilation failed in require at (eval 6) line 3.\n
>        ...propagated at D:/Perl/lib/base.pm line 93.\n
> BEGIN failed--compilation aborted at D:/Perl/site/lib/ModPerl/Registry.pm
> line 26.\n
> Compilation failed in require at (eval 5) line 3.\n
>
> The ServerUtil.dll file does exist.

There's a couple of things to check:

- if you're running Apache 2.2.x and perl-5.10, the relevant mod_perl
ppm package to install is
     http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd
Was that installation successful, including installation of
mod_perl.so under your Apache modules subdirectory?

- Does having a directive in your httpd.conf to load the perl510.dll, like
   LoadFile "/Path/to/your/Perl/bin/perl510.dll"
help? This should go before the
   LoadModule perl_module modules/mod_perl.so
directive which loads mod_perl.so.

--

-- 
best regards,
Randy

Mahesh Khambadkone | 1 Jun 17:27 2009

RE: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

Thanks for the revert.

I'm running Apache 2.2.x and perl-5.10.0, using binary build 1104 of
ActiveState.

1)	Yes, the ppm package was taken from 
     http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd, as per
instructions at
http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages, and I
specified that the mod_perl.so be installed at c:\mod_perl.

2)	Yes, my .conf file includes a loadfile before the LoadModule :

LoadFile "D:/Perl/bin/perl510.dll"
LoadModule perl_module "C:/mod_perl/mod_perl.so"

I used c:\mod_perl as per http://perl.apache.org/docs/2.0/rename.html.

In anycase, I went ahead and uninstalled mod_perl, reinstalling directly
into c:\apache\modules, but I still get the same error.

-----Original Message-----
From: Randy Kobes [mailto:randy.kobes <at> gmail.com] 
Sent: 01 June 2009 19:54
To: Mahesh Khambadkone
Cc: modperl <at> perl.apache.org
Subject: Re: Using mod_perl on Vista - get Error - Can't load Perl module
ModPerl::Registry

On Mon, Jun 1, 2009 at 12:32 AM, Mahesh Khambadkone
<mahesh <at> games2win.com> wrote:
> The config sample you sent now allows my Apache to start-up, but I get an
> error.
>
> 1)      The config sample I was using was taken from the mod_perl
> Developer's Cookbook - Recipe 2.2 Using Apache Registry. I guess a lot of
> the other examples there will be buggy !

I don't think one can conclude they're buggy, as there's still
problems with your setup, as described below.

> 2)      The new error I get is when the Perl script is actually run :
>
> Can't load 'D:/Perl/site/lib/auto/Apache2/ServerUtil/ServerUtil.dll' for
> module Apache2::ServerUtil: load_file:The specified procedure could not be
> found at D:/Perl/lib/XSLoader.pm line 64.\n
> at D:/Perl/site/lib/Apache2/XSLoader.pm line 31\n
> Compilation failed in require at
D:/Perl/site/lib/ModPerl/RegistryCooker.pm
> line 30.\n
> BEGIN failed--compilation aborted at
> D:/Perl/site/lib/ModPerl/RegistryCooker.pm line 30.\n
> Compilation failed in require at (eval 6) line 3.\n
>        ...propagated at D:/Perl/lib/base.pm line 93.\n
> BEGIN failed--compilation aborted at D:/Perl/site/lib/ModPerl/Registry.pm
> line 26.\n
> Compilation failed in require at (eval 5) line 3.\n
>
> The ServerUtil.dll file does exist.

There's a couple of things to check:

- if you're running Apache 2.2.x and perl-5.10, the relevant mod_perl
ppm package to install is
     http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd
Was that installation successful, including installation of
mod_perl.so under your Apache modules subdirectory?

- Does having a directive in your httpd.conf to load the perl510.dll, like
   LoadFile "/Path/to/your/Perl/bin/perl510.dll"
help? This should go before the
   LoadModule perl_module modules/mod_perl.so
directive which loads mod_perl.so.

--

-- 
best regards,
Randy

Perrin Harkins | 1 Jun 17:25 2009
Picon

Re: Strange Apache error (appears to be related to bad pidfile)

On Mon, Jun 1, 2009 at 6:50 AM, Chris Brooks <madbury <at> gmail.com> wrote:
> My first try was to execute apachectl stop and then apachectl start.

You won't see the errors if you use apachectl.  Just talk to httpd
directly instead.

- Perrin

Jean-Damien Durand | 1 Jun 17:31 2009
Picon

Re: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

Mahesh Khambadkone a écrit :
> Thanks for the revert.
>
> I'm running Apache 2.2.x and perl-5.10.0, using binary build 1104 of
> ActiveState.
>
> 1)	Yes, the ppm package was taken from 
>      http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd, as per
> instructions at
> http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages, and I
> specified that the mod_perl.so be installed at c:\mod_perl.
>
> 2)	Yes, my .conf file includes a loadfile before the LoadModule :
>
> LoadFile "D:/Perl/bin/perl510.dll"
> LoadModule perl_module "C:/mod_perl/mod_perl.so"
>
>
> I used c:\mod_perl as per http://perl.apache.org/docs/2.0/rename.html.
>
> In anycase, I went ahead and uninstalled mod_perl, reinstalling directly
> into c:\apache\modules, but I still get the same error.
>   

Perhaps a hidden dependency to apreq ? 
http://cpan.uwinnipeg.ca/PPMPackages/10xx/libapreq2.ppd .
Who knows. Cheers, JD.

Mahesh Khambadkone | 1 Jun 19:05 2009

RE: Using mod_perl on Vista - get Error - Can't load Perl module ModPerl::Registry

Unfortuntely, that did not help either (libapreq2)

-----Original Message-----
From: Jean-Damien Durand [mailto:jeandamiendurand <at> free.fr] 
Sent: 01 June 2009 21:02
To: Mahesh Khambadkone
Cc: 'Randy Kobes'; modperl <at> perl.apache.org
Subject: Re: Using mod_perl on Vista - get Error - Can't load Perl module
ModPerl::Registry

Mahesh Khambadkone a écrit :
> Thanks for the revert.
>
> I'm running Apache 2.2.x and perl-5.10.0, using binary build 1104 of
> ActiveState.
>
> 1)	Yes, the ppm package was taken from 
>      http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd, as per
> instructions at
> http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages, and I
> specified that the mod_perl.so be installed at c:\mod_perl.
>
> 2)	Yes, my .conf file includes a loadfile before the LoadModule :
>
> LoadFile "D:/Perl/bin/perl510.dll"
> LoadModule perl_module "C:/mod_perl/mod_perl.so"
>
>
> I used c:\mod_perl as per http://perl.apache.org/docs/2.0/rename.html.
>
> In anycase, I went ahead and uninstalled mod_perl, reinstalling directly
> into c:\apache\modules, but I still get the same error.
>   

Perhaps a hidden dependency to apreq ? 
http://cpan.uwinnipeg.ca/PPMPackages/10xx/libapreq2.ppd .
Who knows. Cheers, JD.

Chris Brooks | 1 Jun 19:26 2009
Picon

Re: Strange Apache error (appears to be related to bad pidfile)

Hi Perrin,

Cool, that's a good suggestion.  I'll work with httpd directly if it happens again.

Thanks,
Chris

On Mon, Jun 1, 2009 at 10:25 AM, Perrin Harkins <pharkins <at> gmail.com> wrote:
On Mon, Jun 1, 2009 at 6:50 AM, Chris Brooks <madbury <at> gmail.com> wrote:
> My first try was to execute apachectl stop and then apachectl start.

You won't see the errors if you use apachectl.  Just talk to httpd
directly instead.

- Perrin

Geoff Toogood | 2 Jun 02:51 2009

Re: Problems with SetEnv and Alias

Perrin Harkins wrote:
On Mon, May 25, 2009 at 2:30 AM, Geoff Toogood <geoff <at> allotz.com> wrote:
I have a <VirtualHost> directive which incorporates a mod_perl PerlTransHandler. This VirtualHost block of the config also has some Alias and SetEnv directives defined. The PerlTransHandler module behaves correctly and works well but it seems that when I execute a PHP document under this VirtualHost I lose the $_SERVER (%ENV in perl) variables and Alias settings I have set in the Apache VirtualHost block of my config.
That should work. Can you try it with a simple CGI script, to see if the PHP config is the problem? - Perrin
I just thought respond to this and say that it worked fine with a Perl CGI script. I did manage to get things working for PHP in the end. I was using <VirtualHost *:80> in the VirtualHost section (along with NameVirtualHost *:80), as soon as I changed this and defined an IP address instead of * (effectively making it not use NameVirtualHost) it worked!!

That was not really a solution for me because it means I need to have a separate IP address for each of these VirtualHost sections I may want to add Alias' or set ENV variables in the config :oS Anyone know why that might be? (I know it is not really a modperl related question, more of an apache question so feel free to ignore it :o)  FYI I have a standard debian linux setup running apache2 and modperl.

Thanks for all your help guys.

Geoff T


--
body { color: #000; margin: 0; padding: 10px; font-family: sans-serif; font-size: 12px; } a:link, a:visited { color:#b2b003; text-decoration: none; } a:hover, a:active { color: #df6d0a; text-decoration: underline; } .grey { color: #efeeed; } hr.grey { border: 0px solid #efeeed; height: 1px; background-color: #efeeed; width: 100%; } .bold { font-weight: bold; } .contact { font-size: 12px; color: #a62a35; } .contact span { color: #dc4f32; } table#member { border: 1px solid #c8c8c8; border-color: #e8e8e8 #c8c8c8 #c8c8c8 #e8e8e8; } table#member p { text-align: center; font-size: 10px; font-weight: bold; font-style: italic; color: #444; margin: 0; padding: 3px 10px; } .dis { font-size: 9px; color: #ccc6a6; text-align: justify; clear: both; } Kind regards,
Geoff T

Geoff Toogood
Analyst / Programmer & System Administration

a: Level 5, 128 Bundall Rd, Bundall QLD 4217, Australia
t: +61 7 5574 0681   f: +61 7 5574 0932
e: geoff <at> allotz.com
w: www.allotz.com

Allotz is a proud member of the following associations...


Gmane