You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Carla von Reitzenstein <c....@googlemail.com> on 2011/09/19 19:38:06 UTC
problem with mod_perl and twiki
Hello,
I tried to use my TWiki under mod_perl, but after enabling mod_perl the
design is broken.
To enable mod_perl I've added the following to my twiki configfile for
apache:
<FilesMatch "^(?!configure)[a-z.]+$">
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlSendHeader On
PerlOptions +ParseHeaders
</FilesMatch>
The error log gives the following error for any picture in the TWiki:
[Mon Sep 19 19:16:11 2011] [error] Unrecognized character \\x10 in column
241 at /var/www/twiki/pub/TWiki/TWikiDocGraphics/group.gif line 1.\n
and for Javascript code:
[Mon Sep 19 19:16:10 2011] [error] syntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 2, near "#line 1
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js\n// TWiki
namespace\n"\nsyntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 4, near ")
{"\nsyntax error at /var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js
line 10, near "head["\nsyntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 13, near
"head["\nsyntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 17, near
"}\n }"\nsyntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 22, near "// Get
all "\nsyntax error at /var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js
line 31, near "elms["\nsyntax error at
/var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 37, near ";\n}"\n
I'd be glad about any suggestion.
Thanks,
Carla
Re: problem with mod_perl and twiki
Posted by Carla von Reitzenstein <c....@googlemail.com>.
Hi Torsten,
thanks a lot for your answer. That was exactly what I've done wrong, so it's
working now :)
Best regards,
Carla
2011/9/19 Torsten Förtsch <to...@gmx.net>
> On Monday, 19 September 2011 19:38:06 Carla von Reitzenstein wrote:
> > <FilesMatch "^(?!configure)[a-z.]+$">
> > SetHandler perl-script
> > PerlResponseHandler ModPerl::Registry
> > PerlSendHeader On
> > PerlOptions +ParseHeaders
> > </FilesMatch>
>
> Obviously, this config applies also for JS/CSS files and images. Hence
> modperl tries to interpret those files as perl code. I don't know TWiki
> but I think you should modify the regexp above to match only perl
> scripts, something like ".+\.pl". It depends upon your or rather TWiki's
> naming conventions.
>
> Torsten Förtsch
>
> --
> Need professional modperl support? Hire me! (http://foertsch.name)
>
> Like fantasy? http://kabatinte.net
>
Re: problem with mod_perl and twiki
Posted by Torsten Förtsch <to...@gmx.net>.
On Monday, 19 September 2011 19:38:06 Carla von Reitzenstein wrote:
> <FilesMatch "^(?!configure)[a-z.]+$">
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlSendHeader On
> PerlOptions +ParseHeaders
> </FilesMatch>
Obviously, this config applies also for JS/CSS files and images. Hence
modperl tries to interpret those files as perl code. I don't know TWiki
but I think you should modify the regexp above to match only perl
scripts, something like ".+\.pl". It depends upon your or rather TWiki's
naming conventions.
Torsten Förtsch
--
Need professional modperl support? Hire me! (http://foertsch.name)
Like fantasy? http://kabatinte.net