Join or Login

How to enable PERL in Wampserver 2.0

by me


This is how I enabled PERL in Wampserver 2.0.
Before I begin, here is my computer information: Windows XP service pack 2, Wampserver 2.0.
I first downloaded PERL from active Perl. Then I opened my wamp “www” directory and added a file called cgi-bin.
Now untar your your PERL tarball and open up the folder called Perl that was just made. Open up the folder called ActivePerl-5.8.8.822-MSWin32-x86-280952. Click on Installer your will now be in a command prompt window. When given the option “[c:\Perl]“, type in “C:\wamp\bin\perl”,  this keeps the PERL language separated just like the PHP, Apache, and MySQL.
Now the fun stuff. Open up your apache httpd.conf file by clicking the wampser icon located in your windows task-bar going to Apache and clicking the httpd.conf icon. Look for 

<Directory "cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

Now change this to 
<Directory "C:/wamp/www/cgi-bin">
    AllowOverride None
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

Now go down and find ” <IfModule mime_module>” you should see “#AddHandler cgi-script .cgi” uncomment this, i.e. remove “#”, and change to “AddHandler cgi-script .pl”. When you do make perl scripts you will have to use “#!c:\wamp\bin\perl\bin\perl.exe” to call the PERL scripting engine. You could even add index.pl to your Directory indexes, but they would probably only work in your file cgi-bin.
I hope this helps you out. Please remember I only use Wampserver as a testing server never online and I do not think this is the clean way of doing it, but it works for me.

Tags: ,

4 Responses to “How to enable PERL in Wampserver 2.0”

  1. Techy News » How to enable PERL in Wampserver 2.0 Says:

    [...] Read the rest of this great post here [...]

  2. Techy News » Blog Archive » How to enable PERL in Wampserver 2.0 Says:

    [...] Read the rest of this great post here [...]

  3. joran Says:

    Nice article….cept i cant quite get it to work.
    It keeps giving me a forbidden message for anything ending in .pl
    and if i try and goto my cgi-bin directory

  4. me Says:

    To tell you the truth I haven’t used wampserver in quite some time, I am suprised that they haven’t made a module for perl yet. You might want to consult a Perl forum, But from what your comment says it seems that you are having a mime type issue. You might get lucky with “AddHandler cgi-script .cgi .pl” and you might want to add index.pl to your index lists in the httpd.conf file

    #!/usr/bin/perl #comment: the real path to perl like the one above in the article

    # comment:your httpd.conf should have something like this:

    # Alias /perl/ /real/path/to/perl-scripts/

    #
    # SetHandler perl-script
    # PerlHandler Apache::Registry
    # PerlSendHeader On
    # Options +ExecCGI
    #

    try the above but un-comment the the non comments.

Leave a Reply

Powered by WordPress