|more useful options|
CGI with nested apps, each calling param() to get their argsby Zforgetaboutit (Initiate)
|on Oct 11, 2012 at 21:55 UTC||Need Help??|
Zforgetaboutit has asked for the
wisdom of the Perl Monks concerning the following question:
$ perl --version
$ /usr/sbin/httpd -v
$ cat /etc/redhat-release
From a Linux bash command line I invoke a1 with some command line args. a1 uses CGI param() to parse these args - no problems.
From the command line I invoke a2 with some command line args. a2 uses CGI param() to parse these args - no problems.
Change a1 so that it also invokes 'a2 with some command line args'. This instance of a2 can still parse args - no problems.
BUT invoked via a web browser a1 (still calls a2) can use param() to parse args but a2 seems to not be able to.
Here is a1.cgi
Here is a2.cgi
Here is terminal session usage and output from a1.cgi # PASS
Here is terminal session usage and output from a2.cgi # PASS
Here is browser output from web server url http://somewhere/a1.cgi?v1=box # FAIL
As you can see, a1.cgi succeeds but a2.cgi fails to parse it's args via param(), when run by my 'simple' Apache web server.
I EXPECTED a2.cgi to sucessfully use param() regardless of my 3 invocation methods: 2 interactive + 1 apache.
This behavior is naively unexpected by me; can somebody please explain this mechanism?