 |
Apache2Triad Help, Support and Development The apache2triad help , support and development forums
|
| View previous topic :: View next topic |
| Author |
Message |
oneoleguy
Joined: 10 May 2008
Posts: 1
|
| Posted: Sat May 10, 2008 11:55 pm Post subject: Perl and Apache2triad 1.5.4 |
|
|
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 |
|
| Back to top |
|
| |
|