AlfieWebDevTips Homefor new and experienced developers
[Home Home] [Web Development Web Development ] [Code Generators Code Generators ] [Resources Resources ] [Contact Us Contact ] |WebDevTips Privacy Privacy |
Print This Page

You are here : Home - Web Development - Home Server - Perl

Install Perl



Perl for Windows

Perl for Windows will allow you to run, test and develop your perl/cgi script in the comfort of your own home. Download Perl from ActiveState. Select the Windows MSI link.

The ActiveState Perl homepage an be found at http://www.activestate.com/Products/ActivePerl/


Start the installation


At this point you can select what you want installed (leave at default)- Change the path to DRIVE:\web\perl Please make sure you type the path as shown.


At this point I went with the default unticked option and clicked next


Leave as ticked and click next


Click finish to close the wizard


Now before we test Perl we have to do 2 things

1. We need to let the server know that we want to use cgi. Open DRIVE:\web\Apache2\conf\httpd.conf in a text editor (one that shows line numbers makes this part easier)

you need to remove the # from line 766
from
#AddHandler cgi-script .cgi
to AddHandler cgi-script .cgi


Line 267 change
from
Options Indexes FollowSymLinks
to
Options Indexes FollowSymLinks ExecCGI

Save httpd.conf and restart the server (use Apache Service Monitor)

2. Time for the Hello World! example.
Copy and paste this into your text editor

#!DRIVE:\web\perl\bin\perl.exe
#change line 1 - must be the full path to the perl executable
print "Content-type: text/html\n\n";
print "hello world!";
exit;



Save it as DRIVE:\web\Apaches2\htdocs\hello.cgi
Open your browser and type http://localhost/hello.cgi into the address bar. If all has went well you should see the words Hello World! in your browser.

If you don't then run through this quick checklist
  • Have you edited the httpd.conf file and saved it?
  • Did you restart the server?
  • Make sure line 1 of your script starts like this
    #!DRIVE:\full\path\to\perl\exe
Check everything carefully if you have followed all the steps so far then you should see Hello World! in your browser.

Next we'll move on to Step 4 - install and test PHP


Setting up a home development server
Step 1 Download all the software
Step 2 install and test Apache
Step 3 install and test Perl
Step 4 install and test php
Step 5 enable server side includes and test
Step 6 install and test mysql
Step 7 install and test phpbb
Step 8 well done
Why not discuss this article in our forum?
Get your questions answered quickly.

24-May-2003




Google
 

[back to top of page]   

[labelled with icra -  - this link will open in a new window] [RSS Content]

[Copyright © WebDevTips]