Puvox – Blog

Install PERL on WAMP Server (localhost)

Installing PERL on WAMPSERVER

Some people need to user PERL on Apache server, like WAMP-Server, XAMP or etc. I have been using the following method and worked well for me (I wanted that because I used web-based CMS, named MovableType, which works only with PERL). So, you have to spend about 5-10 minutes, to read these instructions and do all steps correctly, and you will able to install PERL with  your WAMPserver (If any problems, let us know in comments).

===== Step 1 (Installing PERL) ====

  • Probably you already use WampServer. If not, then at first, download it and install in  “C:\my_servers\wamp” (I always recommend to install servers in same root folder, as stated, i.e. in C:\myservers).   By Default, Wampserver will install in the system, the following components: PHP, Apache Server, MySQL, PHPMyAdmin
  • Download & install Strawberry-Perl (OR ActivePerl. However, I prefer Strawberry Perl, because it already includes Databases module and etc… Shortly, try that, probably you wont regret).   As always, you’d better to change default installation directory to C:\myservers\perl).

    ===== Step 2 (Configuring Apache) ====

  • To configure Apache WebServer to execute Perl & CGI scripts, open C:\myservers\wamp\bin\apache\Apache2.XX.XX\conf\httpd.conf file, then search for the line where is: Options Indexes FollowSymLinksand change that line to:
    Options Indexes FollowSymLinks Includes ExecCGI
  • Now find the line:
    #AddHandler cgi-script .cgi
    and remove # character. (This will “un-comment” that line. Thus, this line will start working). Also, below that line, add this another line too:
    AddHandler cgi-script .pl
  •  Now, search for the line:
    DirectoryIndex index.php  …  and replace it with this:
    DirectoryIndex index.php index.php3 index.html index.htm index.cgi index.pl

==== Step 3 (Enable MySQL module) =====

Now, you have to enable MySQL module in PERL (In some cases, you might also have to install that at first before enabling). Here is an instruction to install & enable MYSQL module for PERL.

==== Step 4 (Enable IMAGE modules) ====

In PERL, you also have to Enable “Image Libraries“. Otherwise some functions ( for example, thumbnail and image generation or modification), wont be available for your server,and you might get errors)… So, open C:\servers\your-perl-dir\bin\cpan and execute these lines one-by-one:

install Image::Magick
install GD
install Imager

Note, if you are unable to run CPAN, then you can open CMD and navigate from there (directly runC:\servers\your-perl-dir\bin\cpan, or use cd command).

Now, Restart WAMP and your .pl files should work!

p.s. thanks to http://chromicdesign.com/2009/05/setting-up-perl-for-wampp.html & hwh .

Exit mobile version