http://www.perlmonks.org?node_id=945924


in reply to Re^2: Apache Registry with Server Side Includes
in thread Apache Registry with Server Side Includes

Hello Monks,

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.

To clarify, please find inlined below a simple SSI/shtml file and a script:

<!-- 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; }

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.

<Directory /var/www/registry> SetHandler perl-script PerlResponseHandler ModPerl::Registry # PerlOptions +ParseHeaders (prevented 2+ invocations) Options +ExecCGI </Directory>

Any insights would sure be appreciated... Thanks!