> Internal Server Error
> Cannot read script output pipe.
[SNIP]
> Anyone know why it cannot read script output pipe? Or what in the
> heck this means.
When a program is connected to a web server using the CGI interface, that
program is referred to as a "CGI Script". So, any program you write in
RPG that uses CGIDEV2 is a CGI Script -- or just a "Script" for short.
How do scripts work? When the HTTP server runs a CGI script, it creates
two pipes. Pipes are communications channels that transmit data in one
direction. When the HTTP server runs your program, it uses two pipes to
communicate with you. It creates an input pipe (connected to your
program's "standard input") and an output pipe (connected to your
program's "standard output") After it runs your program, it writes all of
the input data (the "POST DATA" from the browser) to your script. To do
that, it uses the input pipe.
It then waits for your program to process that input data and expects you
to write the result to the output pipe. (That's what CGIDEV2 does when
you run the "callp wrtsection('*fini')"
Hopefully that helps you understand what the error message means. It
means that it ran your program and can't read (or can't understand) the
output data from your program.
What causes this? Well, there are a lot of possible things that might
cause your program to fail to write output that the HTTP server can
understand.
Here are some common mistakes:
a) You forgot to write the "content-type: text/html" (or other headers) at
the top of the output.
b) You forgot to leave an empty line after the headers. This empty line
separates the headers from the HTML document -- so forgetting it will
really confuse the HTTP server.
c) You forgot to call wrtsection('*fini') before your program ended. OR,
some error condition may have caused the program to end without calling
wrtsection('*fini')
One of the best ways to troubleshoot errors with CGI programs is to type
WRKACTJOB SBS(QHTTPSVR) and look for the jobs that run CGI programs
(QZSRCGI). One of these jobs should have a job log that shows any errors
related to your program.
The other thing, of course, is to look at the CGIDEBUG log that CGIDEV2
creates.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/wbFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Easy400Group/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/