> You could use that little script deployed with embperl which
> compiles pages offline (embpexec.pl or sth, I don't remember the
> name) and invoke it in backticks, but that is really really slow
> of course
Don't make it so complicated... ;-)
Ensure to set "AcceptPathInfo On" in your httpd.conf and perhaps
the following:
Embperl_AppName Dynamic
Embperl_Object_Base dynamic.epl
EMBPERL_OBJECT_APP dynamicapp.pl
Choose one... or make your own ;-)
# Embperl_UriMatch "\.htm.?$|\.epl$|\/$|\.ehtm.?$|\.shtm.?$"
# Embperl_UriMatch ".*"
EMBPERL_OBJECT_FALLBACK dynamicfallback.html
content of fallback does not matter (we'll never call it ;-) )
but need it to get into dynamic.epl
minimal dynamicapp.pl:
sub init {
return 0;
}
1;
your dynamic.epl (or base.epl):
[-
$r = shift;
my $uri = $r->param->uri;
[.. do something with the uri, e.g get table for it content..]
my $content = "<html>....</html>"; # save it into $content
# and display it...
Embperl::Execute({
inputfile => '...some file', # is important for embperl (e.g. caching)
# it identifies the "real" request with
it
mtime => undef, # time for last modified...
input => \$content
});
... if you need it you can even redirect the output with
output => \$outputvar
-]
hope there's no typo and it helps...
perhaps Gerald knows a faster way ;-)
cu
J�rg
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
wolf-systems IT-Services
Ihr Partner f�r ein sicheres und best�ndiges Netzwerk
http://www.wolf-systems.net
-----Original Message-----
From: Andre Landwehr [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2003 10:14 AM
To: [EMAIL PROTECTED]
Subject: Re: Dynamic Embperl
On Thu, Nov 13, 2003 at 09:46:04AM +0100, Jochen Topf wrote:
> a) Compile something out of the database into Embperl. If it is only
> Perl code you can just use eval, but with Embperl code its another
> problem. I have no idea how to do this but maybe somebody else can
> help.
You could use that little script deployed with embperl which
compiles pages offline (embpexec.pl or sth, I don't remember the
name) and invoke it in backticks, but that is really really slow
of course
> (But it is sort of ugly, because if something changes you always
have
> to rewrite the Apache config file, so if somebody has a better
> solution, please tell me :-)
cool idea to use mod_rewrite, I hadn't thought of that yet. For
mod_rewrite you can specify regular expressions so you won't have
to rewrite the config file that often. Sth. like the following
(untested, most probably won't work since I never really used
mod_rewrite):
RewriteRule ^(/foo/bar/baz)(.*)$ /$0/process.epl?path=$1
Andre
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]