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

I have compiled a cgi for Apache using activestate developers kit (perlapp) on a HPUX box.

This works OK on all HPUX boxes except one.

The message in the Apache error log is

Panic: Can't find bfs section

Tue May 9 14:16:03 2006 error client 147.149.193.105 Premature end of script headers: /osmf/mgmt/UCPS/p uma/webserver/cgi-bin/gpp/psadm1/uploadrec

It works Ok as a script ie uncompiled

Has anybody got any ideas.

Thanks

Replies are listed 'Best First'.
Re: Apache CGi's
by marto (Cardinal) on May 10, 2006 at 11:17 UTC
      You are most likley not printing your header first before anything else is being printed.

      A header would be like

      print "Content-type: text/html\n\n" or print $q->header();
      If your code is erroring then what is getting printed might be going to the browser and causing this error -- you can check your error logs to see if this is happening.
      Another quick check type of thing is to do a print as the first thing:
      print "Content-type: text/plain\n\n"
      and then let the rest of the existing code execute; if your code is erroring you will see it show up in plain text in the browser. Also you can see when your expected header is coming out and if anything is being printed before that.