Installing mod_perl on a local Windows-based, Apache server
The home page of mod_perl gives a great explanation of what mod_perl is, and what it provides. We'll be installing mod_perl simply because it will help us install other functionality as time goes by.
The home of mod_perl is located at http://perl.apache.org/. Select Download > Binary mod_perl distributions, and find Win32 Active Perl > Win32 mod_perl 1.0 ppm packages. This will lead you to http://theoryx5.uwinnipeg.ca/ppms/x86/, where you can download mod_perl-1.so Save to c:\home\downloads.
First place a copy of the mod_perl-1.so file into C:\Program Files\Apache Group\Apache\modules\, and change it's filename to mod_perl.so.
Next, open httpd.conf, and search for mod_foo.so.
At the end of the LoadModule calls, add the following:
LoadModule perl_module modules/mod_perl.so
Now scroll down a bit and add to the end of the AddModule calls the following:
If you installed ActivePerl to a location other than c:\usr\, then your dll file may be in a different location. Also, if you installed a different version, you'll need to verify the perl dll version. It should be in the format of perlxx.dll.
Search for .cgi, and add .pl to the end of this line. You'll end up with the following.
AddHandler cgi-script .cgi .pl
Finally, save httpd.conf and restart Apache.
Testing the install of mod_perl
Now, create a document with the following text:
print "Content-type: text/plain\n\n";
print "mod_perl rules!\n";
Save this as mod_perl_test.pl, in your Web root folder (c:\home\ if you've been following along). Now load http://localhost/mod_perl_test.pl Once you do, you should simply see "mod_perl rules!".
Additionally, load up http://localhost/phpinfo.php and scroll down to the apache heading. You should see, in the Apache Version, mod_perl/1.29_01-dev (or something similar to this, depending upon what version you installed).
You've now successfully installed mod_perl.
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.