[m_p] SSI after CGIs...

"Dodger" <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
Okay, I'm going crazy here...

I've tried both Apache::Filter AND Apache::OutputChain to no avail (or
rather to bad avail).

The former (Filter), if I enable loading PerlModule Apache::RegistryFilter
and restart, for some reason when I hit a mod_perl Registry script I get:

[Mon Nov  8 23:04:27 2004] [error] Undefined subroutine
&Apache::Registry::handler called.

Every time I hit *any* mod_perl CGI. And even if I don't have anyting
actually USING Filter in the conf, at all.

So this seems to simply be not working, though I am mystified as to how it
creates the illusion in the webserver that *Registry* suddenly loses its
hander subroutine (as much as I hated to do it, I even looked and double
checked that the method was, in fact, there).



The latter (OutputChain with SSIChain) is even WEIRDER.

It DOES parse the SSI as long asd there's no call to another mod_perl script
lower down (like, when I tried to 'include virtual' a SHTML page that in
turn 'include virtual's a mod_perl CGI, the whole thing just hung and left
me with a lot of zombies from my repeated hits on it before I realised what
was not going on -- namely, it was never finishing and things were left dead
from hitting the 20 layer recursion limit and then somehow also not dying
off -- note that when I hit the SHTML page *by itself* it is fine, and the
mod_perl script did nothing but print out an include virtual pointing at
it... That doen't seem right anyway...

But it's worse... it's out of order...

Here, look:

http://www.xfx-3d.com/include1.shtml
http://www.xfx-3d.com/include2.shtml

Those are (despite the 's' in the extension) static HTML files with nothing
but what you see when you hit them in them.

This: http://www.xfx-3d.com/include_both.shtml
Is an SSI page with the following source:

<!--#include virtual="/include1.shtml" -->
CONTENT
<!--#include virtual="/include2.shtml" -->

Now I also have a little apache registry script, right here:
http://www.xfx-3d.com/include_both.mp

The source for this is:
#!/usr/bin/perl

use strict;
use CGI;
my $cgi = new CGI;
print $cgi->header;

print <<"EOF";
<!--#include virtual="/include1.shtml" -->
CONTENT
<!--#include virtual="/include2.shtml" -->
EOF


The two should have the EXACT same output, except maybe a carriage return or
two....

But when you see them on screen, nope...

Now, as DUMB as it was, I actually DID test to see if something was coming
goofy out of Perl itself, by running the script from the command line and
piping it into an SHTML file.

http://www.xfx-3d.com/include_both_from_mp.shtml

So you see, coming out of Perl everything is in the correct order.

For some reason, when the SSIChain parses through the SSI, it deposits
everything it interprets and includes at the TOP of the output not in the
place where it actually belongs.

This is bad. What the hell is going on here???


All this made me took at Apache::Registry a little too much and I think I
may now be clinically insane, because of all the things it seems to be doing
that don't make any sense at all... like calling methods on $r that are
defined in Apache::RegistryLoader, which Apache::Registry never actually
calls... After that I think I'll stick to 'safe' reading material, like the
Necronomicon.

The reason I was looking at Apache::Registry is I was trying to find a place
I could hook a call to Apache::SSI to parse the SSI right in there, maybe. I
couldn't find it. But Cthulhu ate my brain after that. Yaaaagh!


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.