note
bbfan
Hello Monks,
<p>
Although the problem of getting a SSI-invoked script into Apache Registry was "solved", it seems that the scripts in my (and maybe your?) Apache Registry directory take on a behavior that is, in my case, undesired. Specifically, calling the same script several times within a SSI-parsed file causes each invocation of the script to use the same argument as was passed in from the first invocation.
</p><p>
To clarify, please find inlined below a simple SSI/shtml file and a script:
</p><p><code>
<!-- file test.shtml -->
<html>
<head></head>
<body>
<!--#include virtual="/cgi-bin/test.cgi?count=5"-->
<!--#include virtual="/cgi-bin/test.cgi?count=10"-->
<!--#include virtual="/cgi-bin/test.cgi?count=30"-->
</body>
<html>
#!/usr/bin/perl -w
# test.cgi
use strict;
use CGI qw(-compile :all);
my $count = param('count');
my $a = 0;
print header;
while ( $a < $count) {
print ++$a;
}
</code>
</p><p>
When run from the default /var/www/cgi-bin/ directory, execution works as expected. However, when run from the Apache Registry directory below, each invocation counts only to 5.
</p><p>
<code>
<Directory /var/www/registry>
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
# PerlOptions +ParseHeaders (prevented 2+ invocations)
Options +ExecCGI
</Directory>
</code>
</p><p>
Any insights would sure be appreciated... Thanks!
</p>
945804
945811