Monday, June 29, 2009

Premature end of script headers

This error comes when we execute a Perl/Php/python script from apache http webserver. This is a common error which get reported for many problems.
The actual error reported in apache log file is

Use of uninitialized value in concatenation (.) or string at HAT.pm line 887.
Use of uninitialized value in string eq at HAT.pm line 888.
[Mon Jun 29 04:07:36 2009] [error] (2)No such file or directory: exec of /var/www/main/CEandPorting/internal/hotfix/automation/cgi-bin/hat_branches.cgi failed
[Mon Jun 29 04:07:36 2009] [error] [client 128.222.51.107] Premature end of script headers: /var/www/main/CEandPorting/internal/hotfix/automation/cgi-bin/hat_branches.cgi

This error got resolved for me after changing the cgi script from Windows format to Unix format (using notepad++)

No comments: