[clug] Weird 500 error - script not executing?

Paul Wayper paulway at mabula.net
Sat Jul 9 04:20:52 GMT 2005

Hi there!

To take you away from the dull drudgery of spam notices using the clug list 
address, I've got a knotty problem with Apache and Perl CGI.  I'm adding a 
couple of scripts to a website I run (use plug qw(www.davesweboflies.com)) 
but one is now not working in a very strange way.  I get a 500 (Internal 
Server Error) message whenever I go to the page, with the line in the error 
log being:

[...] Premature end of script headers: subs.cgi; referer 

The script is set executable by all, and I can run it and it gives the 
outputs I expect.  It's being posted to by the referer, which is in the 
same directory and runs fine.  I've put warn statements in the script and 
it doesn't seem to execute them - it's as if something stops the script 
running before it actually executes the script at all.  I've tried renaming 
the file in desperation, to no effect.

What other ways could apache call the script that would differ from the 
command line?  What else could cause this problem?

Thanks in advance,


SigClean 1.5a prevents all errors in transcription, transmission, and
reception of eMail, destroys sig and email viruses, and stops flames.
Report all bugs to the author. SigClean is FreeWare. (c)1998-2004 PJW

More information about the linux mailing list