On 2/21/06, Matt Weston <MWeston@xxxxxxx> wrote: > Try changing it to hello.pl > Thanks. Just tried that doesn't seem to care what what the file is name or what extension it has, it just keeps giving the Premature end of script headers error. I also tried just now adding use CGI::Carp 'fatalsToBrowser'; print "Content-Type: text/html\n\n"; and I still get the error. Doesn't seem to matter what's in the file either. I discovered this problem as I was trying to install MoveableType (so I really need it to work without me having to rename everything to .pl or add extra lines of code). So now what? Thanks. > > > >>> strycat@xxxxxxxxx 2/21/2006 8:12:17 AM >>> > All of my perl scripts generate this error when I try to have Apache > serve them. I'm on RHEL with Apache 2.0.52. > > The simplest script I have is: > #!/usr/bin/perl > print "Hello"; > > In the error log I'm told: > [Tue Feb 21 08:57:48 2006] [error] [client 10.33.1.32] Premature end > of script headers: hello.cgi > > I've tried changing LogLevel from warn to debug and still only get this message. > > In httpd.conf, I load cgi_module (mod_cgi.so) at the beginning as well > as suexec_module (mod_suexec.so). > > I also set the following: > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" > <Directory "/var/www/cgi-bin"> > AllowOverride None > # Options None > Options ExecCGI > Order allow,deny > Allow from all > </Directory> > > in /var/www, when I do ls -lh I get > drwxr-xr-x 2 root root 4.0K Feb 21 08:53 cgi-bin > > in /var/www/cgi-bin, when I do ls -l I get > -rwxr-xr-x 1 apache apache 32 Feb 20 16:01 hello.cgi > > I have tried changing the owner and group of hello.cgi It was at first > both root and I changed it to apache (which is what httpd runs as). > > I've tried changing the location of the cgi-bin directory. I've tried > to change the name of the file to just hello (dropping the cgi > extension). I've changed permissions on both the file and the cgi-bin > directory (when I do that, it will sometimes complain in suexec.log > that something is writable by others). I've tried not loading suexec, > but that doesn't change the result. > > I don't know what to do at this point. What should I try next? > > Thanks in advance, > > Tom > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx