A2: When you write programs like this (called via the CGI interface from Apache) you must write headers, then an empty line, then the data. This error means that it never found the blank line that ends the headers. Most common reasons are (a) its not getting written at all, (b) you've forgotten to include the headers (c) you've forgotten to include the blank line that tells it about the end of the headers or (d) you're writing in the wrong character set so it doesn't understand it.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.