You are not writing out the proper HTTP headers (if you look in your access log, you'll see a 500 level error). You need to return at least this:

content-type: text/html
<blank line>

"<blank line>" is just a line with a CR and LF and the end.


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of John Rusling
Sent: Thursday, August 28, 2008 12:53 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: CGIDEV2 - Apache - Premature end of script headers error message.

I'm going thru the "Intro to Web Programming With RPG" available off
Scott Klement's site under presentations.

I'm to the part where you call up an initial html page to accept input,
after you key input you click the okay button to call an RPG pgm that
uses cgidev2 to write up the second page. Page 21 - "Input From the

I modified his example to accept 1 field as input - State, and that is
only variable I'm expecting to be passed to the next step RPG pgm using

However after I click okay, after typing NY in the state input box I
getting the "Page cannot be displayed error." And the log reveals what
pasted in below. (I DON'T think the RPG pgm is getting called at all?)

I've got authority set on the WEB04 program to public/all.
The part where cgi-bin points to programs is working as the examples
before this point all work.
I've doublechecked the ifs filename for the RPG pgm txt template.

Any ideas, thoughts, tips or suggestions are welcome.

John B
sigh ;-

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].