setting up to use DWIMperl with wampserver?
Posted by: dtbaker61 (63.229.162.---)
Date: August 20, 2013 01:23AM

I am in the process of installing my development/test enviroment on a win7 pc. Installed wampserver, and default perl from DWIMperl. The wampserver doesn't seem to be seeing the perl installation. On my old PC perl ended up installing under c:\usr but this new install put it under c:\dwimperl

Anybody have experience setting up a dev/test environment like this? do I need to move perl, or set some config info in wampserver to find perl?



Edited 1 time(s). Last edit at 08/20/2013 01:24AM by dtbaker61.

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: dtbaker61 (63.229.162.---)
Date: August 22, 2013 12:31AM

ok, I didn't get any help here.... but found some answers elsewhere. I thought I'd post here for future newbies looking to configure wampserver to run perl. In fact, I'd suggest that the Wampserver team make these changes to the default .conf file so that perl scripts will run 'out of the box'.

You need to edit the Apache configuration file.

Go to “C:\wamp\bin\apache\Apache2.2.11\conf” directory and open “httpd.conf” file. Edit the httpd.conf file as below.

1. Inside httpd.conf, look for the line that says “<Directory “c:/wamp/www/”>“, just a few lines below this you’ll find the line that says “Options Indexes FollowSymLinks“. Add “Includes ExecCGI” in the line just next to FollowSymLinks, thus it look like this

Options Indexes FollowSymLinks Includes ExecCGI

This will enable CGI script inside your www folder.

2. Now look for the line “AddHandler cgi-script .cgi“, this line is commented out. You need to enable this by un-comment this line, to do that remove the # character at the beginning of this line. This will add handler for files with .cgi extension. If you want to use .pl file extension in your server add “AddHandler cgi-script .pl” just below the above line. Now you will be able to execute CGI and Perl script with .cgi and .pl, extension.

Lines to add

AddHandler cgi-script .cgi
AddHandler cgi-script .pl

3. To add directory index file, look for the line “DirectoryIndex index.php index.php3 index.html index.htm“. Add index.cgi and index.pl in this line.

Lines to add

DirectoryIndex index.php index.php3 index.html index.htm index.cgi index.pl

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: August 23, 2013 11:45AM

Thanks for sharing

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: dtbaker61 (63.229.162.---)
Date: December 21, 2013 08:55PM

I still have not been able to get perl scripts to run properly from webpages served by wampserver on my localhost for testing..... SOMETHING I am not seeing in the config?!

any ideas? anybody have perl running in conjunction with wampserver on a windows7 box.... I really like to use locahost for testing sites, this is my only reason for even using wampserver....

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: dtbaker61 (63.229.162.---)
Date: December 23, 2013 06:16AM

the instructions for setting up to run perl seem to be for an older version of wampserver. I have added the lines in the apache config such that apache should fire up perl, but there are no provisions I can find to configure wampserver to know where perl is..... under c;\wamp\bin it does not work to add a link to perl, and there are no config files for [perl] like there are for PHP or sql.

so..... what do you have to do to tell wampserver where to find perl (default installed at c:\Perl) ?

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: RiggsFolly (---.as13285.net)
Date: December 23, 2013 06:52PM

Have you changed your perl scripts to run perl from the correct place?


#!C:/Perl/bin/perl.exe

Or whereever you installed the perl processor

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: setting up to use DWIMperl with wampserver?
Posted by: dtbaker61 (63.229.162.---)
Date: December 23, 2013 07:29PM

I have not changed the first line in all the scripts.... that is not required to run on windows as perl uses the ENV variable to find perl. I have a couple admin scripts that run fine standalone on the command line. The problem is running from wampserver2.2 . this version of wampserver does not have any provision I can find that tells wampserver where to find perl.

Options: ReplyQuote


Sorry, only registered users may post in this forum.