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 <> wrote:

The apache logs show that I have a malformed header.  Specifically, it says:
"malformed header from script. Bad header=Loading page (1/2):, referer:"

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




Casey Bralla


Chief Nerd in Residence

The NerdWorld Organisation

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --