Douglas Muth on 24 Mar 2013 13:22:48 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Apache2 Server Error


On Sun, Mar 24, 2013 at 4:14 PM, Casey Bralla <MailList@nerdworld.org> wrote:
The apache logs show that I have a malformed header.  Specifically, it says:
"malformed header from script. Bad header=Loading page (1/2):
GenerateReport.py, referer: http://project1.bralla.com/cgi-bin/Reports.py"

To trouble-shoot this, I have deleted almost the entire program.  In fact, all
it is now is comments!

 
That log message suggests to me that "Loading page (1/2):" is the output written by the program.

Unless you're using some kind of framework, your CGI will probably need "Content-type: text/html" as the very first line of output.  Otherwise, Apache is going to flip out.

-- Doug

--
http://www.dmuth.org/
http://twitter.com/dmuth
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug