× 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.



Kevin,
Many thanks for your help.

The two important directives in my configuration file seem to be

ScriptAlias /cgi-bin/erros /QSYS.LIB/E310PRDOBJ.LIB/E310H00000.PGM
ScriptAliasMatch ^/cgi-bin/E31RPP.PGM/(.*) /qsys.lib/E310PRDOBJ.LIB/$1.pgm

The first screen is displayed correctly by E31RPP which is called
indirectly by the initial program E310H00000, but, for the second screen, I
get [Fri Dec 07 14:52:30 2018] [error] [client 192.168.2.210] ZSRV_MSG0109:
/qsys.lib/E310PRDOBJ.LIB/081692803860903 is not a cgi program:
/qsys.lib/E310PRDOBJ.LIB/081692803860903, referer:
http://192.168.2.70/cgi-bin/erros

Yet it was E31RPP that displayed the first screen, using CGI.

If I use ScriptAliasMatch ^/cgi-bin/(.*) /qsys.lib/E310PRDOBJ.LIB/$1,

then the server starts a second instance and I get an error 500 message so
I feel that the first version seems nearer to what I want.

Do you know if there Is a way that I can persuade the server that E31RPP is
a valid CGI program? It all works fine using HTTP original server under
V5R1 and I am as sure as I can be that the files and programs on the V5R3
system are identical to those on the V5R1 system.

If you still need help with persistent CGI, maybe I can assist. I use the
same programs for 5250 and CGI, testing for environment (5250 or HTML) and
then either doing a 5250 write format or wrtsection for CGI. The headers do
not change between CGI screens.

Many thanks,

Rob





On Thu, 6 Dec 2018 at 19:29, Kevin Bucknum <Kevin@xxxxxxxxxxxxxxxxxxx>
wrote:

^ is the regex anchor for start of line. Scriptaliasmatch uses regular
expressions. The starting place of the documentation is at
https://httpd.apache.org/docs/2.4/mod/mod_alias.html

$1 is a back reference to the first matched section between ()'s, So
whatever (.*) matches. Which should be anything. I don’t know why they
have to be different, I don't even remember if I tried it with the first
method when I tested this long ago.

Are you posting to the second program? Are you sending back the right
headers? There are a lot of moving parts in persistent CGI, and it isn't
very well documented that I could find. I ended up bowing to the pressure
and reworking my processes to be stateless. Anything that needed to be
tracked from one program to the next used session variables.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Rob Dixon
Sent: Thursday, December 06, 2018 1:00 PM
To: Web Enabling the AS400 / iSeries
Subject: [WEB400] Apache directive syntax

As I have said in an earlier post, I have been running a persistent CGI
application on a V5R1 system for ten or more years using the IBM original
HTTP server. I have now transferred it to a V5R3 system and must run it
under Apache. My static pages work correctly but I am having problems with
my dynamic persistent CGI pages. The first screen is displayed correctly
with data retrieved from the database, so I assume that there are no
security problems, yet, when I click on Enter to access the second screen,
I get an error, the actual error depending on which particular version of
my config file I use.

I imagine that the problem is of my making, but, having reacted to various
kind suggestions, as yet I have achieved nothing, and I have to admit that
I really don't know what I am doing. Yet, having searched for many hours
for adequate documentation of the syntax of Apache directives, I cannot
find anything that answers my questions.

For instance, what is the effect of putting *^* at the beginning of a
ScriptAlias or ScriptAliasMatch line? What is the difference between a
ScriptAliasMatch statement that ends with $1 and another that ends $1.pgm?

https://www.easy400.net/cgidev2o/persista.htm states -

“The *ScriptAliasMatch *directive for executing persistent CGI programs
MUST HAVE the following format ScriptAliasMatch /cgidev2p/(.*)
/qsys.lib/cgidev2.lib/$1 The following format WOULD NOT WORK:
ScriptAliasMatch /cgidev2p/(.*).pgm /qsys.lib/cgidev2.lib/$1.pgm”

but neither work for me.

Can anyone please point me at documentation of the Apache syntax that
explains all this?

Many thanks,

Rob
--
Rob Dixon

www.erros.co.uk
www.boarstall.com
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/web400.



[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain
confidential information, belonging to the sender that is legally
privileged. This information is intended only for the use of the
individual or entity named above. The authorized recipient of this
information is prohibited from disclosing this information to any other
party and is required to destroy the information after its stated need has
been fulfilled. If you are not the intended recipient, or the employee of
agent responsible to deliver it to the intended recipient, you are hereby
notified that any disclosure, copying, distribution or action taken in
reliance on the contents of these documents is STRICTLY PROHIBITED. If you
have received this email in error, please notify the sender immediately to
arrange for return or destruction of these documents.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.