Kevin,

Many thanks. Unfortunately, as I said, only the first screen is displayed
as the server fails before control can be passed back to my program code so
the header is not written for the second screen. The correct URI is written
in the address line on the error 404 screen.

Rob

On Mon, 10 Dec 2018 at 13:50, Kevin Bucknum <Kevin@xxxxxxxxxxxxxxxxxxx>
wrote:

If 081780817443836 is the value that you have in the Accept-HTSession
header, then I don't see anything obviously wrong.

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Rob Dixon
Sent: Saturday, December 08, 2018 10:49 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Apache directive syntax

The header is correct for the initial display. Having got that screen, I
then started a service program for the job and set a breakpoint at the
beginning of the calc specs for my CGI program, which, as I have said, is
the same program that displayed my first screen. But when I pressed Enter
to get the second screen, there was no breakpoint. There was nothing in
CGIDEBUG for the second screen. but the log said

[Sat Dec 08 14:18:19 2018] [error] [client 192.168.2.210] ZSRV_MSG0018:
File /QSYS.LIB/E310PRDOBJ.LIB/E31RPP.PGM/081780817443836/ does not exist,
referer: http://192.168.2.70/cgi-bin/erros [Sat Dec 08 14:18:19 2018]
[error] [client 192.168.2.210] ZSRV_MSG0016: URI in request POST
/cgi-bin/E31RPP.PGM/081780817443836/ HTTP/1.1 is not valid,
referer: http://192.168.2.70/cgi-bin/erros

The relevant config lines seem to be
* 7* * ScriptAlias /cgi-bin/erros
/QSYS.LIB/E310PRDOBJ.LIB/E310H00000.PGM*
* 8* * Alias "/cgi-bin/" "/QSYS.LIB/E310PRDOBJ.LIB/"*
* 9* * ScriptAliasMatch ^/cgi-bin/(.*) /$1*
* 10*
* 11* * # ScriptAliasMatch ^/cgi-bin/(.*) /qsys.lib/E310PRDOBJ.LIB/$1*

Line 7 executes correctly with the display of the first screen. I have
tried it with line 11 instead of line 9 and the result is the same.

I switched on trace with *verbose logging and learnt nothing from that
except that it seemed that to imply that there was a successful match.

Have you, or anyone else, any idea what I am doing wrong?

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.



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

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.