Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Perl and Apache2triad 1.5.4
Google
Post new topic Reply to topic
Author Message
oneoleguy
 
 


Joined: 10 May 2008
Posts: 1

PostPosted: Sat May 10, 2008 11:55 pm Reply with quoteBack to top

Hi,

I installed A2T 1.5.4 in January and am just now starting to learn Perl.

I tried running the 1st program in most tutorials, a simple Print "Hello", but it didn't work. I am in the 2nd or 3rd generation of that program and find that it works in both my domain hosts servers (both running Linux/Apache), but not in A2T. This is the program:

Code:

#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "<html><head>";
print "<title>CGI Test</title>";
print "</head>";
print "<body><h1>I just wrote a web page using Perl!</h1>";
print "</body></html>";


This is the error message:

Quote:

Error message:
couldn't create child process: 720003: 3rdprgm.cgi


I wonder if the Perl portion of A2T is installed right?

Does anyone know what I need to do to get it to work?

Bill

======
I may have found the answer in a 2006 post by Vlad:
Quote:

your problem is probably not the cgi-bin at all
apace2triad parses .pl files with mod_perl , and .cgi files with mod_cgi
perl scripts that start with a shebang perl path line generally are written for and work better on mod_cgi

so if it is not a problem rename them from pl to cgi , to test if mod_cgi and mod_perl are loaded please use the apache2triadcp test scripts


I found the test.pl and test.cgi in the c:\apache2triad\htdocs\apache2triad\ directory.

In the test.cgi script, the shebang line looked like this:

Code:

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


When I change my shebang line to this one, it worked fine!

Wahoo!

Bill

NOTE I made the same change to the file with a .pl extension and it didn't work. It seems it does matter that the extension is .cgi
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT