[ALUG] CGI Script

Andreas Tauscher ta at lonestar-bbs.de
Sat Mar 2 12:37:48 EAT 2013


Am 14.02.2013 08:28, schrieb Hamisi Jabe:
> Any idea please will help. I installed perl language to run the cgi script
> but i either get "premature end of script headers: index.cgi" message of
> server mis-configurations please contact the server administrator or see
> the log files for errors

Run the script from commandline. There you might see some error messages.
The script is sending to STDOUT before any HTML header is sent.
check the webservers error.log carefully. There you might already see an
hint.
With perl mostely: Modules missing or syntax errors in the config file.

Maybe adding this line at the top of the script might show you the
errors in the browser:
use CGI::Carp qw(fatalsToBrowser);

How did you get the file on the server? If ftp from a windows machine:
Take care that you upload perl scripts in ASCII mode.

Andi


More information about the Linux mailing list