mnieer has asked for the wisdom of the Perl Monks concerning the following question:

Dear all,

I have a problem in file execution the error log return this error but I don't know what's the error mean exactly. Iam using Alias for this link due to the caching issues. I looked for solutions. I found some solutions say about the problem I used them but there are no specific answer about this problem.

This is error message from error log

Sun Jun 09 10:33:05 2013 error client xx.xx.xx.xx (2)No such file or directory: exec of '/opt/v-hosts/usr/xxxx/searchHotelsTh4.pl' failed, referer: http://dev.xxxxx.com/xxxx/booking.cgi

Sun Jun 09 10:33:05 2013 error client xx.xx.xx.xx Premature end of script headers: searchHotelsTh4.pl, referer: http://dev.xxxxx.com/xxxx/booking.cgi

some suggested solution but it doesn't work

add this header

print "Content-type: text/html\r\n\r\n";
In addition to another solution but it dosn't work

Please Can you help me to solve this problem ??

Replies are listed 'Best First'.
Re: Premature end of script headers Error ..Help me
by Corion (Patriarch) on Jun 09, 2013 at 08:03 UTC

    The good thing is that you show us the web server error log. This says that there is no such file /opt/v-hosts/usr/xxxx/searchHotelsTh4.pl. So, what steps did you take to verify that there is such a file?

Re: Premature end of script headers Error ..Help me
by CountZero (Bishop) on Jun 09, 2013 at 08:08 UTC
    Add
    use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
    to your scripts and see the raw Perl error messages and warnings on the screen rather than in the error log.

    Also make sure that all your scripts run under the usual strictures use strict; use warnings;

    If that does not give you a better clue to solve the prioblem post the error and warning messages here and we will look again.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re: Premature end of script headers Error ..Help me
by rpnoble419 (Pilgrim) on Jun 10, 2013 at 04:17 UTC

    you can also use CGI to output your header by using the following:

    use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); my $q = new CGI; print $q->header();