× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter

At 11:21 AM 1/26/1998 -0500, you wrote:
>Frustration is setting in with my attempts to get a CGI program to run. I write
>the thing (or from later experiements, type it in from the redbook), compile it
>to a module, bind it into a program with service program QTCP/QHTMHCGI, put it
>in the WEBEXE library that I set up to hold CGI executables and their data, hit
>the thing with a web browser, and get "500 - CGI program failed." For every
>thing that I write, type in, or compile from source members kicking around on
>CDs. If I replace the program objects with precomiled ones from the redbook CD,
>they work just fine. I must be missing a step, but the TCP Reference, and Cool
>Title redbook aren't telling me anything different than what I'm doing.
>
>Also, last week or thereabouts, I was discussing REXX CGI as a possibility with
>someone on the list who said he used a a lot of REXX for this, and I'd like to
>know how the REXX procedures were started. QCMDEXE call with STRREXPRC? I got
>that to work locally just fine and typing the expected input that was to have
>been passed by the http server got the expected results. Running it as a CGI
>got the CGI Program Failed message.

Something wrong with your Exec directives. Here's something from _ICS, ICSS Web Programming Guide_ (not available in PDF, only HTML or CD library):

>>>>
Error 500: Bad script request - /QSYS.LIB/CGI.LIB/HTMLSRC.FILE not executable

Cause:Incorrect match of Exec rule.
Solution:See Description of "Forbidden - Path not valid for this server"

<<<<

>>>>
Error 403: Forbidden -- Path not valid for this server

Whenever a "Forbidden - Path not valid for this server" occurs when running a CGI program, the configuration directives have not been specified correctly.
Cause when a CGI program is requested:When a CGI program is requested, a Pass directive appears before an Exec directive. For example:

Pass qsys.lib/htmlcgi.lib/*

Exec qsys.lib/htmlcgi.lib/*

In this example any programs in library htmlcgi will not run because the Pass occurred before the Exec. Once a Pass condition is true, the server does not go further.
Solution when a CGI program is requested:Change the order of the directives to correct the problem. For example:

Exec /qsys.lib/htmlcgi.lib/*

Pass /qsys.lib/htmlcgi.lib/*

Note: Since the value mapped /qsys.lib/htmlcgi.lib/ is the same for both Pass and Exec, the combination above would correct a problem with using an incorrect directive but also leaves a directive in the file that could never be used.
The best way to avoid this problem is to use one of the following:
1.Use Exec and Pass directives with mapping:

Pass /doc/* qsys.lib/html.lib/*

Exec /cgi-bin/* qsys.lib/html.lib/*

2.Put the CGI programs in a separate library:

Exec /qsys.lib/htmlcgi.lib/*

Pass /qsys.lib/htmldoc.lib/html.file/*

Cause when a document is requested:When a document is requested, an Exec directive appears before a Pass directive. For example:

Exec qsys.lib/html.lib/*

Pass qsys.lib/html.lib/*

In this example any documents in library html will not be found because the Exec occurred before the Pass.
Solution when a document is requested:Change the order of the directives to correct the problem. For example:

Pass /qsys.lib/html.lib/*

Exec /qsys.lib/html.lib/*

Note: Since the value mapped /qsys.lib/html.lib/is the same for both Pass and Exec, the combination above would correct a problem with using an incorrect directive but also leaves a directive in the file that could never be used.
The best way to avoid this problem is to use one of the following:
1.Use Exec and Pass directives with mapping:

Pass /doc/* qsys.lib/html.lib/*

Exec /cgi-bin/* qsys.lib/html.lib/*

2.Put the CGI programs in a separate library:

Exec /qsys.lib/htmlcgi.lib/*

Pass /qsys.lib/htmldoc.lib/html.file/*


<<<<

hth


Vernon Hamberg
Systems Software Programmer
Old Republic National Title Insurance Company
400 Second Avenue South
Minneapolis, MN 55401-2499
(612) 371-1111 x480


+--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to "MIDRANGE-L@midrange.com". | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 by midrange.com 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].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.