Ronni wrote:



Philip M. Gollucci wrote:

Ronni wrote:

I have spent many days now searching through the archives and although they are close to what I am seeing none are exactly like what I have.

I am using Apache 2 and installing ModPerl 2 on a Linux Mandrake 10.1 box. Apache 2 is a recent install and ModPerl 2 is something I would like to get working soon.

I can run perl from cgi-bin but would like to keep the perl stuff in it's own directory. I've set this up numerous times using the ModPerl online documentation as well as all the Apache/ModPerl info I can find.

I've added the following to the httpd.conf file:

PerlModule Apache2 ##This allows perl -V to look in /Apache2/ under the perl install Alias /perl/ /usr/local/apache2/perl/ ##The directory I would like to keep the perl scripts
 <Location /perl>
     SetHandler perl-script
     PerlResponseHandler ModPerl::Registry
     PerlOptions +ParseHeaders
     PerlOptions -GlobalRequest
     Options +ExecCGI
 </Location>

The log file shows the following at apache startup:

[Tue Jun 28 08:42:59 2005] [notice] Apache/2.0.54 (Unix) mod_perl/2.0.1 Perl/v5.8.5 configured -- resuming normal operations


So it appears that everything is fine.
Then when I use an address like the following:

       http://localhost/perl/rock.pl

with the following in rock.pl

      #!/usr/bin/perl

         print "Content-type: text/plain\n\n";
         print "mod_perl 2.0 rocks!\n";

I get an Internal Server Error page with the following in the error_log:

[Tue Jun 28 13:00:31 2005] [error] [client 127.0.0.1] failed to resolve handler `ModPerl::Registry': Bareword "Apache::OK" not allowed while "strict subs" in use at /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm line 160.\nBareword "Apache::OK" not allowed while "strict subs" in use at /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm line 162.\nBareword "Apache::OK" not allowed while "strict subs" in use at /usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm line
       170.\nBEGIN not safe after errors--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/RegistryCooker.pm line 200.\nCompilation failed in require at (eval 4) line 3.\n\t...propagated at /usr/lib/perl5/5.8.5/base.pm line
       85.\nBEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/Apache2/ModPerl/Registry.pm line
       25.\nCompilation failed in require at (eval 3) line 3.\n

Have I lost my mind? I'm new to modperl. Thanks in advance for any help that you would be able to offer! Trust me! It is GREATLY appreciated!

Thanks!
Ronni




You're trying to mix mp2 apis.  It change drastically in mp2 1.99 RC5.

Apache2.pm from PerlModule Apache2 no longer exists. You've managed to install mp2.0.0+ over an older version before 1.99 RC5 which shouldn't be possible.

Read this:
http://perl.apache.org/docs/2.0/rename.html

The constant should be written as
Apache2::Const::OK

>PerlModule Apache2 ##This allows perl -V to look in /Apache2/ under the perl install
That won't affect perl -V since its in your httpd.conf

What it *USED* to do was change your @INC at run-time to look in the right place. See the above link for why you don't do this anymore.

HTH



Thanks for the reply Philip but I'm still in the dark. I have read that post a few times and I have updated my CGI stuff. Is something not updated? Do I need to remove something? To be honest I'm not even certain I would be smart enough to mix anything. I just downloaded Apache2 and installed it then downloaded ModPerl2.0.1 from CPAN and followed the ModPerl online instructions.

PerlModule Apache2 does affect the perl -V that I see. If I omit this line then I don't look in the perl path of /Apache2/ while adding this line allows perl -V to show a perl path ending in /Apache2/. Are you suggesting I remove it?

Thanks for the help.
What does HTH stand for anyway?

Ronni

HTH - Hope this/that Helps

The easiest suggestion would be to start with a clean perl installation (particularly the libs/ directory). Odds are you're following the directions correctly. Its something from your past or (a previous admins') that messing you up.

**********************************************************************
******** BACK UP THINGS FIRST IF YOU WANT THEM ***********************
**********************************************************************

Before installing mod_perl 2, either remove an earlier mod_perl 2 installation (prior to 1.999022 aka before RC5), or else choose to install the new version in a different area. To remove enough of a prior installation of mod_perl 2 in order to satisfy this requirement, one can do, on Unix,

 % find /usr/lib/perl5 -name 'Apache2*' -exec rm -rf {} \;

where //usr/lib/perl5/ is the top-level root of your Perl tree. Note that this will also remove any 3rd party Apache modules installed under an /Apache2/ subdirectory. In many situations you would want to do this, as such modules will need porting to the new API. However, if there are modules under this location that you want to keep, you can use

 % find /usr/lib/perl5 -name 'Apache2*' -exec ls -lR {} \;





--
END ---------------------------------------------------------
   What doesn't kill us can only make us stronger.
              Nothing is impossible.
                                
Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Developer / Liquidity Services, Inc.
    http://www.liquidityservicesinc.com

Reply via email to