The subject says it all. I am doing a:
I have a perl script in which I am using a ReadParse routine that parses the
$ENV{'QUERY_STRING'} or $ENV{'CONTENT_LENGTH'}*which are two variables passed
to the script under usual SSI (.shtml) containing form data submitted to the
page from which the script is executed from.
Well, since switching to PHP, I have moved most of my perl scripts to php
equivalents, but there are a few perl scripts that are just too big for me to
try to convert them, and I am unsure if what they do could even be accomplished
by PHP. So I am going to continue to use them. The problem, though, is that
when I use...
print shell_exec("script.pl");
....to execute the scripts, these environment variables aren't passed and the
script cannot perform it's task. Is there a way to circumvent this, and pass
these through?
I have found that doing this is my perlscript:
foreach (keys %ENV){
print "$_ -> $ENV{$_}<br>";
}
Outputs alot of variables, where one reads:
HTTP_SERVER_VARS -> Array
I suspect that this $ENV variable might be an array of all my wanted ariables,
allthough I must confess that I do not know how to list them or use them, if
so. I tried...
print $ENV{'HTTP_SERVER_VARS'}{'QUERY_STRING'};
....but that yielded nothing. So I am at loss, and I am hoping someone out there
has a solution for my predicament.
Thank you in advance!
--
Sandman[.net]