Casey Bralla on 25 Mar 2013 06:13:16 -0700


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

Re: [PLUG] SOLVED! Apache2 Server Error


Doug, your suggestion was right on target. I had the Content-type statement, but I discovered that my program was outputting some text before Apache saw that content-type statement.

 

I set the "quiet" option and stopped the program from send output (so the "Content-type" statement was first), and everything works now.

 

Thanks for your suggestion!

 

 

On Sunday, March 24, 2013 4:22:43 PM Douglas Muth wrote:

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



--

 

Casey Bralla

 

Chief Nerd in Residence

The NerdWorld Organisation

http://www.NerdWorld.org

___________________________________________________________________________
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