I am trying to setup the apache web server on a linux fedora platform. Everything seems to be working with the exception of executing a perl script when invoked from a webpage. Every time I try to execute my perl script from my webpage I get an "500 Internal Server Error" and the following error logs:
(13)Permission denied: exec of '/cgi-bin/test.pl' failed Premature end of script headers: test.pl
I've triple checked the permissions of the cgi-bin directory and the perl script and they look fine...
drwxr-xr-x 2 root root 4096 Jul 1 17:38 cgi-bin [root@localhost cgi-bin]# ll -rwxr-xr-x 1 root root 159 Jul 1 17:38 test.pl
I've verified the location of my cgi-bin directory is correct. When I remove test.pl I get a "404 Not Found" error instead of the server error. I also verified the script runs fine from the command line. My script is very basic and intended only to verify I can execute perl scripts. Code is below...
#!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); use strict; use warnings; print "Content-type: text/html\n\n"; print "testing testing\n"; exit;
Any thoughts on what I could be doing wrong would be greatly appreciated.
In reply to Premature end of script headers error by huklberry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |