1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Setup Apache HTTP Server 2.0 to run on a local machine and execute .PL scripts

Discussion in 'Apache' started by Novice2014, Jan 24, 2014.

  1. #1
    Hi,

    I am 3 days new to figuring out how to get Perl scripts to run on my Windows XP box. I downloaded and installed the Apache installation file "httpd-2.0.65-win32-x86-openssl-0.9.8y.msi" and the "strawberry-perl-5.18.2.1-32bit.msi" from the perl.org site in hopes that I could get a feedback form to work for a web site that I am working on.

    Out of the many pages that I have viewed online of how to configure the Apache Server, nothing has given any favorable results with their explanations.

    My last attempt was following http://editrocket.com/articles/perl_apache_windows.html where I could not get the example to work. I did the changes to the Apache file "Edit the Apache httpd.conf Configuration File" fairly easily but I must be having problems with the test.pl because I can't get it to work.

    I used a different version of Perl (Strawbery from perl.org because it installed without giving me an error pop up after installation) and after copy pasting the script, in an attempt to get it working, I ended up changing it in hopes that I could get it working, shown below.

    #!/strawberry/bin/perl.exe
    print "Content-type: text/html; charset=iso-8859-1\n\n";
    print "<phtml>";
    print "<body>";
    print "Test Page";
    print "</body>";
    print "</html>";

    This is what the site says to create the program with:

    #!/perl/bin/perl
    print "Content-type: text/html; charset=iso-8859-1\n\n";
    print "<phtml>";
    print "<body>";
    print "Test Page";
    print "</body>";
    print "</html>";

    where I assumed that "#!" meant the "C:" drive and substituted the first "/perl" with the folder the Strawbery Perl had installed itself to and left the second "/perl" in the first line thinking that it was referring to the executable in the "C:\strawberry\perl\bin" folder.

    This is the error I get when trying to get the script to run when typing "localhost/test.pl" in the address bar.

    "Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    ........"

    Anybody know what I am doing wrong?

    Know how I can change the title of this post to read "Configuring Apache HTTP Server 2.0 to run Perl in Windows"?
     
    Last edited: Jan 24, 2014
    Novice2014, Jan 24, 2014 IP
  2. HalfDedi

    HalfDedi Greenhorn

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    8
    #2
    it's easier to just use XAMPP for windows, it comes with Apache, MySQL, PHP and Perl pre-installed. see apachefriends.org
     
    HalfDedi, Jan 31, 2014 IP