problem with mod_perl and twiki

problem with mod_perl and twiki

am 19.09.2011 19:38:06 von Carla von Reitzenstein

--0015174bf1da40d7c704ad4ece16
Content-Type: text/plain; charset=ISO-8859-1

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:

SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlSendHeader On
PerlOptions +ParseHeaders


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

--0015174bf1da40d7c704ad4ece16
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,

I tried to use my TWiki under mod_perl, but after enabling mo=
d_perl the design is broken.
To enable mod_perl I've added the follo=
wing to my twiki configfile for apache:
=A0<FilesMatch "^(?!conf=
igure)[a-z.]+$">

   SetHandler perl-script
   PerlResponseHandler ModPerl::Regist=
ry
   PerlSendHeader On
   PerlOptions +ParseHeaders
</=
FilesMatch>

The error log gives the following error for any pictu=
re in the TWiki:

[Mon Sep 19 19:16:11 2011] [error] Unrecognized character \\x10 in column 2=
41 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 &quo=
t;#line 1 /var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js\n// TWiki n=
amespace\n"\nsyntax error at /var/www/twiki/pub/TWiki/TWikiJavascripts=
/twikilib.js line 4, near ") {"\nsyntax error at /var/www/twiki/p=
ub/TWiki/TWikiJavascripts/twikilib.js line 10, near "head["\nsynt=
ax error at /var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 13, =
near "head["\nsyntax error at /var/www/twiki/pub/TWiki/TWikiJavas=
cripts/twikilib.js line 17, near "}\n      =A0 }"\nsy=
ntax error at /var/www/twiki/pub/TWiki/TWikiJavascripts/twikilib.js line 22=
, near "// Get all "\nsyntax error at /var/www/twiki/pub/TWiki/TW=
ikiJavascripts/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
r>

--0015174bf1da40d7c704ad4ece16--

Re: problem with mod_perl and twiki

am 19.09.2011 20:19:37 von torsten.foertsch

On Monday, 19 September 2011 19:38:06 Carla von Reitzenstein wrote:
>
> SetHandler perl-script
> PerlResponseHandler ModPerl::Registry
> PerlSendHeader On
> PerlOptions +ParseHeaders
>


Obviously, this config applies also for JS/CSS files and images. Hence=20
modperl tries to interpret those files as perl code. I don't know TWiki=20
but I think you should modify the regexp above to match only perl=20
scripts, something like ".+\.pl". It depends upon your or rather TWiki's=20
naming conventions.

Torsten Förtsch

=2D-=20
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Re: problem with mod_perl and twiki

am 20.09.2011 09:16:26 von Carla von Reitzenstein

--0015175d03cce31a5704ad5a3ca1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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

> On Monday, 19 September 2011 19:38:06 Carla von Reitzenstein wrote:
> >
> > SetHandler perl-script
> > PerlResponseHandler ModPerl::Registry
> > PerlSendHeader On
> > PerlOptions +ParseHeaders
> >

>
> 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
>

--0015175d03cce31a5704ad5a3ca1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Torsten,

thanks a lot for your answer. That was exactly what I=
9;ve done wrong, so it's working now :)

Best regards,
Carla r>

2011/9/19 Torsten Förtsch tr"><torsten.foertsch@gmx.ne=
t
>


x #ccc solid;padding-left:1ex;">
On Monday, 19 September 2=
011 19:38:06 Carla von Reitzenstein wrote:

> =A0<FilesMatch "^(?!configure)[a-z.]+$">

> =A0 =A0SetHandler perl-script

> =A0 =A0PerlResponseHandler ModPerl::Registry

> =A0 =A0PerlSendHeader On

> =A0 =A0PerlOptions +ParseHeaders

> </FilesMatch>



Obviously, this config applies also for JS/CSS files and images. Henc=
e

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! ( e" target=3D"_blank">http://foertsch.name)



Like fantasy? http://kab=
atinte.net





--0015175d03cce31a5704ad5a3ca1--