Re: Dynamic Embperl
On Thu, Nov 13, 2003 at 06:44:37AM -, Peter Moran wrote: > Is it possible for Embperl not to use *real* files ? > > What I want to do is to save template files inside a DB which will have > Embperl code within them - I want to be able to retrieve the templates > within a perl script and then *compile* the page to produce the result. > > Main difference between doing this in offline mode is I dont want a > inputfile and a outputfile, just a input scalar (containg the template) and > a output scalar (containing the compiled page) > > > Is this doable ? I have been looking long and hard through the previous > mails but to no avail any suggestions welcome. There are really two problems here: 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. b) How to get apache/Embperl to call your script if it is not at the proper place. Here I am using this solution, explained by an example: I want to get the URL http://www.example.com/foo/bar/baz In rewrite this with Apache mod_rewrite to http://www.example.com/foo.html?path=/bar/baz And now I have an Embperl File foo.html which will do the right thing. With this solution you at least don't need the file any more. (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 :-) Jochen -- Jochen Topf [EMAIL PROTECTED] http://www.remote.org/jochen/ +49-721-388298 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
Re: Trouble with Embperl installing :(
Hi! On Wed, Nov 12, 2003 at 04:47:37PM +0200, Argle Bargle wrote: > I won't bother installing, because had different kinds of trouble in >previous versions even if installed. I installed anyway and have no problems so far. > How do I check, that I have perl >w/o threads and what is wrong with the default build I use? if "perl -V" gives ... COMPILE_TIME_OPTIONS: ... USE_ITHREADS ... ... than you have Threads. But: As far as i know embperl runs with threaded perl as well as with non-threaded. It just has some problems with threaded apache (mpm-worker). Benni -- http://www.aymargeddon.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embperl CGI and IIS howto
Gerald, A long time ago you had the attached correspondence. I am using isapi_fcgi.dll and it seems to be working for simple test scripts, eg, counter.pl. But I need it to work for Embperl. You mention you got it to work for Embperl after patching the dll. Can you send me the dll and any install/config instructions? I can write-up my experiences to the list. Thanks, Maurice > PerlEx - > after installation > I changed the file association for .epl from > > C:\perl\bin\perl.exe c:\mysite\embpcgi.pl %s > > to > > C:\perl\bin\PerlISEX.dll c:\mysite\embpcgi.pl %s > > ...but no luck there - is this vaguely right - any ideas? Perlex is not good for this, you can use perlis.dll, but this also doesn't accept an argument, so it won't work this way. I have developed an IIS filter dll, that make it possible to use it, but at the moment there are some issues with threads and Perl memory management, so it isn't usabe right now. > FastCGI - > after installing FCGI, I changed the associations from: > > C:\perl\bin\perl.exe c:\mysite\embpcgi.pl %s > > to > > C:\perl\bin\perl.exe c:\mysite\embpfastcgi.pl %s > > ...which didn't break anything - but didn't seem to give me a performance > increase - am I missing something here too ? It will things a little bit slower, because it additional loads FCGI.pm, but for the rest it's just doing the same. FastCGI is working different, you need a dll that dispatchs the request to an extra process. There is one called isapi_fcgi.dll (see www.fastcgi.com for the source), but I had to patch it to get it working with Perl/Embperl (the author uses it for PHP). I have done this last week and it seems to work fine. The main problem is, that it has no diagnostics and you have to set sveral registry keys to get it working. On a computer without a Visual C++ Debugger, you can't see what going wrong. I like to add some logging function and then I will publish the way how to use it... ...and then things really runing much faster, then with a normal CGI Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamic Embperl
> 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_APPdynamicapp.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 = ""; # 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]
Re: Dynamic Embperl
On Thu, Nov 13, 2003 at 10:14:08AM +0100, Andre Landwehr wrote: > >(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 Yeah, I know about that, but it still means I have two places (httpd.conf and the Filesystem) where I have to change things when something changes. And every time I do this I forget to change the httpd.conf, wonder why it doesn't work and then smack my head and fix it. :-) Jochen -- Jochen Topf [EMAIL PROTECTED] http://www.remote.org/jochen/ +49-721-388298 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with Embperl installing :(
Oh well, I've got it working now. Seems more like transition problems from perl 5.8.1->5.8.2 and recompiling all cpan modules etc. Anyway, thanks for support. > Hi! > > On Wed, Nov 12, 2003 at 04:47:37PM +0200, Argle Bargle wrote: > > I won't bother installing, because had different kinds of trouble in > >previous versions even if installed. > > I installed anyway and have no problems so far. > > > How do I check, that I have perl > >w/o threads and what is wrong with the default build I use? > > if "perl -V" gives > > ... > COMPILE_TIME_OPTIONS: ... USE_ITHREADS ... > ... > > than you have Threads. > > But: As far as i know embperl runs with threaded perl as well as with > non-threaded. It just has some problems with threaded apache > (mpm-worker). > > Benni > -- > http://www.aymargeddon.de > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - Hot Mobiil - helinad, logod ja piltsõnumid! http://portal.hot.ee - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with Embperl installing :(
> > But: As far as i know embperl runs with threaded perl as well as with > non-threaded. It just has some problems with threaded apache > (mpm-worker). > Yes! Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Embperl CGI and IIS howto
> > A long time ago you had the attached correspondence. > > I am using isapi_fcgi.dll and it seems to be working for simple test > scripts, eg, counter.pl. But I need it to work for Embperl. > > You mention you got it to work for Embperl after patching the dll. Can you > send me the dll and any install/config instructions? I can write-up my > experiences to the list. > The problem is that I have only gotten it to run on one computer. The project for which is needed it, got discared, so didn't done any further work on it :-( Some times later I have tried on another machine, but didn't get to work. The probem that you have to put the right values into the registry and you get no error/debug output, so it's just trial and error. I think I can dig up the code I have done, but I it will not work, unless you are able to debug and patch the dll yourself. Would be really cool to get this working, but I would need a payed project where I could us it or someone whos pays me for doing so. Anyway if you like I can look for the sources and send you what I have done so far. Sorry for bad news Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Embperl
>perhaps Gerald knows a faster way ;-) No, that's the way to do it! In case you know when your source changes, you can set the mtime parameter and only change it's value when the source changes, then Embperl will only recompile, when mtime changes Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
Thats the output I got: Program received signal SIGSEGV, Segmentation fault. 0x006bc582 in ?? () (gdb) (gdb) (gdb) BT #0 0x006bc582 in ?? () #1 0x00603c44 in ?? () #2 0x0106 in ?? () #3 0x005d4aa6 in ?? () #4 0x010a6940 in ?? () #5 0x0ab5c5bc in ?? () #6 0x41414141 in ?? () #7 0xbfe6e9a8 in ?? () #8 0x00fdebdd in ?? () #9 0x41414141 in ?? () #10 0x0a8be838 in ?? () #11 0x006039e4 in ?? () #12 0x0ab5c5bc in ?? () #13 0x0aa8d29c in ?? () #14 0xbfe6e9c8 in ?? () #15 0x005e2493 in ?? () #16 0x0ab5c5bc in ?? () #17 0x004c1410 in ?? () #18 0x0a8be838 in ?? () Is THIS really useful? Should I compile with debugging symbols? If yes what? apache or mod_perl? or embperl? Thanks, Alex Von: Gerald Richter <[EMAIL PROTECTED]> am 12.11.2003 07:55 An: Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], [EMAIL PROTECTED] Kopie:[EMAIL PROTECTED] Thema:Re: [mp2] segfault when generating graphs with GD::Graph under Embperl > > 3. This is the core dump trace: (if you get a core dump): > > I tried but I can't catch any (I don't know and didn't manage to find out which > directory has to be writeable for the apache2 process under Embperl). > Please try to start your httpd under gdb: gdb /path/to/httpd set args -X -f /path/to/httpd.conf r Now request the page that segfaults, gdb should show the segfault, then type BT and you should get the backtrace. Gerald P.S. -X tell Apache to only start one process, which is better for debugging *2* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
> > Should I compile with debugging symbols? Yes > If yes what? apache or mod_perl? or embperl? > mod_perl and Embperl For Embperl do perl Makefile.PL debug I don't have in mind the Makefile.PL flag for mod_perl, but you surly find it in the docs :-) Gerald > Thanks, Alex > > > > > Von: Gerald Richter <[EMAIL PROTECTED]> am 12.11.2003 07:55 > > > > An: Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], > [EMAIL PROTECTED] > Kopie:[EMAIL PROTECTED] > > Thema:Re: [mp2] segfault when generating graphs with GD::Graph > under Embperl > > >> >> 3. This is the core dump trace: (if you get a core dump): >> >> I tried but I can't catch any (I don't know and didn't manage to >> find out which directory has to be writeable for the apache2 process >> under Embperl). >> > > > Please try to start your httpd under gdb: > > gdb /path/to/httpd > set args -X -f /path/to/httpd.conf > r > > Now request the page that segfaults, gdb should show the segfault, > then type > > BT > > and you should get the backtrace. > > Gerald > > P.S. -X tell Apache to only start one process, which is better for > debugging > > *2* -- Gerald Richter ecos electronic communication services gmbh IT-Securitylösungen * dynamische Webapplikationen * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 939-122 WWW:http://www.ecos.de/ Fax: +49 6133 939-333 -- | | ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info | +- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
compiled mod_perl and embperl with debugging option. output is this: # gdb /usr/sbin/httpd GNU gdb Red Hat Linux (5.3.90-0.20030710.41rh) Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...(no debugging symbols found)...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) set args -X (gdb) r Starting program: /usr/sbin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x002a9582 in ?? () (gdb) BT #0 0x002a9582 in ?? () #1 0x009d5c44 in ?? () #2 0x0106 in ?? () #3 0x009a6aa6 in ?? () #4 0x005e3940 in ?? () #5 0x09f72cf4 in ?? () (gdb) Doesn't look like a better output than without debugging option... I never did this before. Is something missing? THX Alex Von: Gerald Richter <[EMAIL PROTECTED]> am 13.11.2003 15:44 An: Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED] Kopie:[EMAIL PROTECTED], [EMAIL PROTECTED] Thema:Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl > > Should I compile with debugging symbols? Yes > If yes what? apache or mod_perl? or embperl? > mod_perl and Embperl For Embperl do perl Makefile.PL debug I don't have in mind the Makefile.PL flag for mod_perl, but you surly find it in the docs :-) Gerald > Thanks, Alex > > > > > Von: Gerald Richter <[EMAIL PROTECTED]> am 12.11.2003 07:55 > > > > An: Alexander Hartmaier/DEBIS/EDVG/[EMAIL PROTECTED], > [EMAIL PROTECTED] > Kopie:[EMAIL PROTECTED] > > Thema:Re: [mp2] segfault when generating graphs with GD::Graph > under Embperl > > >> >> 3. This is the core dump trace: (if you get a core dump): >> >> I tried but I can't catch any (I don't know and didn't manage to >> find out which directory has to be writeable for the apache2 process >> under Embperl). >> > > > Please try to start your httpd under gdb: > > gdb /path/to/httpd > set args -X -f /path/to/httpd.conf > r > > Now request the page that segfaults, gdb should show the segfault, > then type > > BT > > and you should get the backtrace. > > Gerald > > P.S. -X tell Apache to only start one process, which is better for > debugging > > *2* -- Gerald Richter ecos electronic communication services gmbh IT-Securitylösungen * dynamische Webapplikationen * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 939-122 WWW:http://www.ecos.de/ Fax: +49 6133 939-333 -- | | ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info | +- *1* - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Possible DBIx::Recordset changes
I wanted to run these by people before I tried anything.
1. A '$/!' argument that can be passed to any command and is appended
after the SQL command. For instance:
$$set->Insert({ '$option' => 'DELAYED' ... });
2. A new command called Replace. It does a Delete followed by an
Insert in those databases that don't support Replace.
3. I'd like an enhancement to make IN work with placeholders, but
that should probably happen at the DBI level. Ideally you should be
able to say
'$where' => 'foo IN ?', # or IN (?) ?
'$values' => [EMAIL PROTECTED],
and have it do the right thing (which would mean turning @list into
either (n,n,n) or ('a','a','a')). Recordset does this in the foo =>
[EMAIL PROTECTED] case, but there's no good way to do it when you have to use a
$where clause.
4. I know at one time someone did a patch to let DBIx::Recordset work
with bigints. Is there an official solution there? At some time or
other I added the following to my code, but I have no idea whether it
does anything:
delete $set->{'*NumericTypes'}->{-5}; # treat bigints as strings
5. I often have forms which need to know all the possible values of
an enum or a set. Since I'm using mysql I wrote the following, but
I'd be interested in a builtin, non-db-specific, solution. This
function returns a has with the following entries:
a mapping from the enum/set number position to it's name
1 => ITEM1, 2 => ITEM2
a mapping from the name to the number (both upper and lower case)
ITEM1 => 1, item => 1, ITEM2 => 2, item2 => 2
-default => the default value for the enum/set
-names => an array of the names
That let's me do something like this in my code:
[- %enums = EnumValues(DBInit(), 'domain', 'status') -]
Status:
[+
$enums{-names}->[$row] +]
sub EnumValues {
my ($db, $table, $name) = (@_);
my (%enum, $sth, $hash, $type, @types);
if ($db->can('DBHdl')) {# DBIx::Recordset, DBIx::Database
$db = $db->DBHdl();
} elsif (!$db->can('prepare')) {
die("DBIx::Enum: $db is not a supported database handle.");
}
$sth = $db->prepare("show columns from $table like '$name'");
$sth->execute();
$hash = $sth->fetchrow_hashref();
$type = $hash->{Type};
# enum('NONE','USER','SUPPORT','STAFF','ADMIN')
die("DBIx::Enum: Type of $name in $table is not enum: $type") if
($type !~ /^(enum|set)/);
$type =~ s#.*\('(.*)'\).*#$1#;
@types = split(/','/, $type);
for (my $i = 1; $i <= @types; ++$i) {
$enum{$types[$i-1]} = $i;
$enum{uc($types[$i-1])} = $i;
$enum{lc($types[$i-1])} = $i;
}
$enum{-default} = $hash->{Default};
$enum{-names} = [EMAIL PROTECTED];
return %enum if (wantarray);
return \%enum;
}
--
Kee Hinckley
http://www.messagefire.com/ Next Generation Spam Defense
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Embperl
At Thu, 13 Nov 2003 11:14:10 +0100, Jörg Kütemeier wrote:
> 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
> });
Just to repeat, since earlier posters seemed to have missed this in
the Embperl docs, 'input' and 'output' args to Execute let you run
to/from a scalar.
The 'mtime' and 'inputfile' args are used for caching, see docs and
take advantage of them if you can (have an mtime field in your DB).
--
- Gus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Embperl
Thanks Angus,
Thats exactly what I need - incidently, what docs is this in, I cant seem to
find it ?
Regards
Pete
- Original Message -
From: "Angus Lees" <[EMAIL PROTECTED]>
To: "Peter Moran" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 13, 2003 10:56 PM
Subject: Re: Dynamic Embperl
At Thu, 13 Nov 2003 11:14:10 +0100, Jörg Kütemeier wrote:
> 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
> });
Just to repeat, since earlier posters seemed to have missed this in
the Embperl docs, 'input' and 'output' args to Execute let you run
to/from a scalar.
The 'mtime' and 'inputfile' args are used for caching, see docs and
take advantage of them if you can (have an mtime field in your DB).
--
- Gus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Embperl
At 12:46 AM + 11/14/03, Peter Moran wrote:
Thanks Angus,
Thats exactly what I need - incidently, what docs is this in, I cant seem to
find it ?
It's there in the HTML::Embperl doc in the Execute docs . I don't
usually use the output, but I use the input case quite a bit. Define
a bunch of template files, then create a database structure and
people can update the database to change the site.
[-
Execute({
input => $this->Commons->toHTMLString(\$Page->{content},
$Page->{contenttype}),
mtime => join('', $Page->{dtm} =~ /[0-9]/g),
inputfile => $req_rec->uri(),
}) if ($Page->{contenttype});
-]
Where $Page is a DBIx::Databse record. The inputfile value gives it
a handle so Embperl can cache it by name, the mtime gives it a value
to see if it needs to reparse.
The Messagefire anti-spam site uses this for page content, help text,
FAQs and lots of other things.
--
Kee Hinckley
http://www.messagefire.com/ Next Generation Spam Defense
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
> Program received signal SIGSEGV, Segmentation fault. > 0x002a9582 in ?? () > (gdb) BT > #0 0x002a9582 in ?? () > #1 0x009d5c44 in ?? () > #2 0x0106 in ?? () > #3 0x009a6aa6 in ?? () > #4 0x005e3940 in ?? () > #5 0x09f72cf4 in ?? () > (gdb) > > Doesn't look like a better output than without debugging option... > I never did this before. Is something missing? > It looks like the programm is jumping to some location with doesn't contain any real code. This is normaly a result of a memory corruption that is happeing earlier and very hard to track down. The best would be to create a very simple test case and reduce complexity of your pages to narrow down the reason. You should test it with a simple Embperl and with a simple Apache::Registry file, so we might know if it is an Embperl or mod_perl problem. Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
Gerald Richter wrote: Program received signal SIGSEGV, Segmentation fault. 0x002a9582 in ?? () (gdb) BT #0 0x002a9582 in ?? () #1 0x009d5c44 in ?? () #2 0x0106 in ?? () #3 0x009a6aa6 in ?? () #4 0x005e3940 in ?? () #5 0x09f72cf4 in ?? () (gdb) Doesn't look like a better output than without debugging option... I never did this before. Is something missing? It looks like the programm is jumping to some location with doesn't contain any real code. This is normaly a result of a memory corruption that is happeing earlier and very hard to track down. There is an easy way to work around it. Run the program under gdb and it'll remember the trace even the memory (frames) gets corrupted. gdb /path/to/httpd gdb> run -X issue a request here and gdb will tell you that you've got a segfault bt will give you the trace. Alex, I'd too suggest that you try to eliminate embperl and see if you can get the same problem with a plain mod_perl script/handler just like Gerald has suggested. __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
Hi Stas, > There is an easy way to work around it. Run the program under gdb and > it'll remember the trace even the memory (frames) gets corrupted. > > gdb /path/to/httpd > gdb> run -X > issue a request here and gdb will tell you that you've got a segfault > bt > will give you the trace. > This is excatly what we have done and which gives the above trace with does not contain any usefull informations ... Gerald -- Gerald Richter ecos electronic communication services gmbh IT-Securitylösungen * dynamische Webapplikationen * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice: +49 6133 939-122 WWW:http://www.ecos.de/ Fax: +49 6133 939-333 -- | | ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info | +- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Antwort: Re: Antwort: Re: [mp2] segfault when generating graphs with GD::Graph under Embperl
Gerald Richter wrote: Hi Stas, There is an easy way to work around it. Run the program under gdb and it'll remember the trace even the memory (frames) gets corrupted. gdb /path/to/httpd gdb> run -X issue a request here and gdb will tell you that you've got a segfault bt will give you the trace. This is excatly what we have done and which gives the above trace with does not contain any usefull informations ... Sorry, Gerald. I've missed that detail then. In which case you need to try to manually step through guessing some breakpoints where things could go wrong. __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
