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
Python, Lua and Tcl - public course schedule [here]
Private courses on your site - see [here]
Please ask about maintenance training for Perl, PHP, Java, C, C++, Ruby, MySQL and Linux / Tomcat systems
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/

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'"
"[error] Can't locate ModPerl/ 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

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.


Posted by Custard (Custard), 10 February 2004

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

According to my book, you need something like.

PerlModule Apache::Registry

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

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



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

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


This page is a thread posted to the opentalk forum at 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., 2018: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01225 708225 • FAX: 01225 793803 • EMAIL: • WEB: • SKYPE: wellho