Perl Script not working

I'm trying to fix a script for a client.

I've done a perl -c and the syntax is ok.
The path from 'Which perl' is the same as the one in the header.

When I call 'perl scripname.cgi' from the shell, it works fine.

However when I call it from http://www.hisdomain.com/cgi-bin/script.cgi it gives an error 500. The cPanel error log says Premature end of script headers. The file has been chowned to him and chmod'd to 0777.

I cant see whats wrong, theres nothing wrong with the rest of the server, all perl scripts work fine apart from this one, I've tried deleting it and re uploading it in ASCII mode but still no joy.

Anyone got any idea ??

 

 

 

 

Top