Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 2000
Posts: 3,590
Likes: 1
Moderator
Moderator
Offline
Joined: Aug 2000
Posts: 3,590
Likes: 1

Installing the Perl package


Downloading ActivePerl for Windows


You can find the binary of ActivePerl 5.6.1 for Windows at:
http://www.activestate.com/Products/Download/Get.plex?id=ActivePerl
[direct link]. The file is 8.6 MB, and is distributed as an MSI package.

Installing ActivePerl


Start the installer, and then click through it (hopefully reading the prompts
along the way) until you get to a screen that looks like the one below.

[Linked Image]

I highly advise that you install Perl to a directory similar
to mine, which is H:usr (yours needs to be whatever drive you have
Apache installed on, i.e. C:usr or D:usr). This is quite
helpful if you also have a Unix or Linux Web server, because then the Perl
path (the first line of any Perl file, usually #!/usr/bin/perl)
will remain the same no matter what. Look at the screen below to see what
I mean regarding installation paths.

[Linked Image]

Continue to set up Perl until you get to the screen below, for which you should
make your options the same as mine.

[Linked Image]

Finish the installation by following the rest of the prompts, then continue
on to the next section when you're done.

Testing the Perl installation


Create a new blank document in Notepad, and then copy and paste
the code below into the file.
Code
#!/usr/bin/perl
print "Hello, World";

Save the file as C:hello.pl. Start up the Command Prompt
and wait until you see C:>. Type perl hello.pl,
hit Enter, and you should see Hello, World. If you
see this, this means that Perl was installed successfully!

[Linked Image]

Allowing Perl to run freely


Back in your httpd.conf file, search for ScriptAlias /cgi-bin/
"H:/apache/cgi-bin/"
and change it to #ScriptAlias
/cgi-bin/ "H:/apache/cgi-bin/"
. Now find
#AddHandler cgi-script .cgi and change it to AddHandler
cgi-script .cgi .pl
. What we've done here is allowed Perl to run from
any directory, and also for files with the extension .pl to be treated
as Perl files (which they should be!).

You'll need to restart Apache for these new changes to take
effect (see the previous page for information on how to restart Apache).

Testing Web-based Perl


Create a new blank document in Notepad, and then copy and paste
the code below into the file.
Code
#!/usr/bin/perl
print "Content-type:text/htmlnn";
print "Hello, World";

Save the file as H:httpdocshello.cgi and then go to http://127.0.0.1/hello.cgi
in your browser to test that it works. If you see what I see (screen shot
below), give yourself a pat on the back!

[Linked Image]

Page 3: Manually installing the PHP package

Sponsored Links
Entire Thread
Subject Posted By Posted
Tutorial: Setting up your own Web server The Team 03/05/2002 1:08 AM
Re: Tutorial: Setting up your own Web server The Team 07/10/2002 5:46 PM
Re: Tutorial: Setting up your own Web server The Team 07/10/2002 5:48 PM
Re: Tutorial: Setting up your own Web server The Team 07/10/2002 6:16 PM
Re: Tutorial: Setting up your own Web server The Team 07/10/2002 6:20 PM
Re: Tutorial: Setting up your own Web server The Team 07/10/2002 6:21 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 538
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 8
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)