httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Bowen <>
Subject Re: [users@httpd] Perl is so hard to install onto Apache, how, please help...
Date Sat, 31 May 2003 18:32:51 GMT
Since you received two incorrect answers so far, I thought I'd take a
moment to give you a little more information.

>   On my old server Perl was a cinch. On Apache it seems I am faced
>   with a world of trouble on my XP machine.
>   1. Most scripts come with "#!/user/bin/perl" but my Perl location is
>   "#!Z:/Apache/Perl"...
>   Do I have to manually change the hundreds of pages with the
>   "#!/user/bin/perl" to "#!Z:/Apache/Perl" or can Apache map it?

No, you do not. On Windows, there is a ScriptInterpreterSource directive
that allows you to use the Windows file association, rather than the #!
line, to map a Perl program to the Perl interpterer.

ScriptInterpreterSource registry

Add that line to your configuration file. The default value is "script"
and looks in the #! line for the location of the interpreter.

Make sure that .pl files (and .cgi files, if you like) are mapped to the
location of the Perl interpeter.

>   2. Trying to apply ActiveState Perl 5.8.0 on Apache 2.0.46 proves so
>   troublesome.
>   I looked for close to an hour about how to install Perl onto Apache
>   as the Active State web site seemed to lack the information and I
>   found this website which seemed to be the most straightforward:
>   I did as it said and from my standpoint I wish to run Perl from
>   anywhere...
>   1. AddHandler cgi-script .cgi .pl
>   (Uncommented, double-checked, done)
>   2. Options FollowSymLinks +ExecCGI
>   (double-checked, done)
>   3. Added and index.cgi
>   (double-checked, done)
>   Trying to run a Perl script returns a 403 Forbidden page... I've got
>   Apache running on localhost:8080, Forbid me?

You need to look in the error log. The "Forbidden" message usually means
that there is a directive somewhere that does not permit files to be
loaded from the directory in question. You may need to add an "allow"
directive for the directory in question:

<Directory /path/to/directory>
 Order allow,deny
 Allow from all

>   For the fun of it I put a Perl script in the cgi-bin and accessing
>   it returns 500 internal error? I double checked the setup and really
>   can't figure out alone what I did wrong...

Look in the error log. Make sure that your script prints content-type
headers correctly.

>   Does someone have a hello world script to test Perl on Apache? I
>   believe the only scripts I got are to test Perl form the command
>   line... as they return either a 403 or 500 with Apache...

Yes, one comes with Apache. It's in the cgi-bin directory.

Or, you can try the following:

print "Content-type: text/html\n\n";
print "Hello, World\n";

>   Can someone please help me on this one. I spent my day yesterday
>   configuring all of my php scripts to run flawlessly, had a little
>   trouble but solved it on my own... Perl doesn't want to play nice
>   though... Any ideas?

Always look in the error log first, no matter what goes wrong. It will
give you a great deal of information that is not immediately evident
from looking in the browser error messages.

Rich Bowen -
Author - Apache Administrator's Guide

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message