Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
mod_perl config problem with apache ?

Posted by mark (mark), 7 January 2004
Hey all,

This should be a simple thing, and I hope its not ... perhaps something very simple and silly is going wrong, but I've exhausted as much as I know.

I'm running
win xp/home
Apache 2.0.48
perl 5.8.2
mod_perl 1.99_13-dev

I installed executables of apache and perl. Then I used PPM to get and install mod_perl

when I run my test program http://localhost/perl/mp_test1.pl


#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "test!\n";

I get "Internal Server Error", so in my apache error.log file I look and find
"[error] failed to resolve handler 'Modperl::Registry'"
and
"[error] Can't locate ModPerl/Registry.pm in @INC (@INC Contains: C:/Perl/site/lib/Apache2/ModPerl C:/Perl/site/win32 C:/Perl/site/win32API
C:/Perl/lib c:/perl/site/lib . c:/apache2 c:/apache2/lib/perl) at (eval 1) line 3.0"

in httpd.conf I have currently added
------------
Alias /perl /Apache2/perl

PerlSwitches -IC:/Perl/site/lib/Apache2/ModPerl
PerlSwitches -IC:/Perl/site/win32
PerlSwitches -IC:/Perl/site/win32API

<Location /perl>
   SetHandler perl-script
   PerlResponseHandler ModPerl::Registry
   PerlOptions +ParseHeaders
   Options +ExecCGI
</Location>
-------------

The 3 lines of 'PerlSwitches' are intended to add the the @INC which seemed not to be looking in the correct place for ModPerl::Registry.  I had searched the whole of my C: drive and all three locations of Registry are included in the @INC (as shown by the error.log above)

Can someone suggest what I could try to fix this problem ?

Many thanks.

MarK.


Posted by Custard (Custard), 10 February 2004
Hi,

Maybe you've sorted this by now, but here goes

According to my book, you need something like.

Code:
PerlModule Apache::Registry

<Location /perl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    PerlOptions +ParseHeaders
    Options +ExecCGI
</Location>


There's so many options for mod_perl, and of course theres mod_perl1 and mod_perl2 now, the combinations are bewildering.

HTH

B

Posted by mark (mark), 19 February 2004
Cheers for the response.  I actually tried a complete re-install after finding some advice on google and followed the instructions in the follwing link http://savage.net.au/Perl/html/upgrade-perl-apache.html

As far as the google poster was concerned, I had made some error in my install and should start again.

I did and it worked !! (yay!)

One point .in your post you suggest ...

> ... Apache::Registry ...

I think is suitable for apache 1.*, but apache 2.* should use
... ModPerl::Registry ...

I'm by no means an apache/perl/modperl expert, but this has worked for me.

cheers for your suggestions

MarK.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho