Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Embperl

Test registry/Execute.htm fails with mod_perl 2.0.5

 

 

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded


dom at earth

May 11, 2011, 3:54 PM

Post #1 of 5 (1347 views)
Permalink
Test registry/Execute.htm fails with mod_perl 2.0.5

As per the README I'm reporting this bug here, rather than on
rt.cpan.org (where I note a few other bug reports have been sent).

As reported at
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624578> this test fails when run with mod_perl 2.0.5.

We have applied some patches at Debian (you can see them at
<http://svn.debian.org/wsvn/pkg-perl/trunk/libembperl-perl/debian/patches/#_trunk_libembperl-perl_debian_patches_>
) but I've reproduced the same problem with a plain unpatched Embperl
2.4.0.

It is triggered by
<http://svn.apache.org/viewvc?view=revision&revision=932875>

but we haven't got any further than that yet. I'd be grateful for
any input if this looks familiar to anyway.

Test output follows:

#112 registry/Execute.htm... <P>Here is some text</P>
<table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
<P>Transfer some vars Some Var !</P>
<P>Transfer some vars Do it again !</P>
<P>Use @param to transfer some data (1 2 3 4) !</P><P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P><P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
Here it starts with some HTML Text<P>

All values should be undefined at the first include and
apear at the second include:
<P>

$a = <BR>
$b = <BR>
$c = <BR>
$d = <BR>
$e = <BR>


First of all assign a value:
<BR>

Now we have some 'Umlaute':


Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>

And now a and b together: (this is the value in $a)(this is the value in $a) &auml;&ouml;&uuml;<P>

Here we have some HTML tags within the perl code, Embperl will delete them!<BR>

57
SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
Here we have something which looks like a HTML tag, but does not start with<br>
a character, Embperl does not change them!<BR>

SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 will get the perl expression $a &lt; 6: <BR>

1
Now they should have a value

$a = (this is the value in $a) <BR>
$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>

<P>Ok.<P>


<html>
<head>
<title>Test for $req_rec in Embperl</title>
</head>

$conf = &lt;undef&gt; <br>
$_[0] = Embperl::Req=HASH(0x42625144) <br>
$_[1] = &lt;undef&gt; <br>

$rec_rec = Apache2::RequestRec=SCALAR(0x42625158)<br>
$$rec_rec = 1107886848<br>

Apache->request = Apache2::RequestRec=SCALAR(0x4262c194)<br>
${Apache->request} = 1107886848<br>

${Apache->request} = $$req_rec ? yes <br>

/home/dom/debian/upstream/libembperl-perl/Embperl-2.4.0/test/html/registry/Execute.htm
</body>
</html>

Error in Line 4
Is: ><H1>2.)IncludefrommemorywithsomeEmbperlcode</H1><
Should: ><P>Hereissometext</P><
Input: test/html/registry/Execute.htm
Output: test/tmp/out.htm
Compared to: test/cmp/Execute.htm
Log: test/tmp/test.log
Testparameter:
modperl = 1

ERRORS detected! NOT all tests have been passed successfully

make: *** [test_dynamic] Terminated
Terminated

Cheers,
Dominic.

--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


richter at ecos

May 12, 2011, 7:51 AM

Post #2 of 5 (1258 views)
Permalink
RE: Test registry/Execute.htm fails with mod_perl 2.0.5 [In reply to]

Hi,

could you tell me which version of perl do you use?

I will take a look at the issue, but not before next week.

Gerald


> -----Original Message-----
> From: Dominic Hargreaves [mailto:dom [at] earth]
> Sent: Thursday, May 12, 2011 12:55 AM
> To: embperl [at] perl
> Subject: Test registry/Execute.htm fails with mod_perl 2.0.5
>
> As per the README I'm reporting this bug here, rather than on rt.cpan.org
> (where I note a few other bug reports have been sent).
>
> As reported at
> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624578> this test fails
> when run with mod_perl 2.0.5.
>
> We have applied some patches at Debian (you can see them at
> <http://svn.debian.org/wsvn/pkg-perl/trunk/libembperl-
> perl/debian/patches/#_trunk_libembperl-perl_debian_patches_>
> ) but I've reproduced the same problem with a plain unpatched Embperl
> 2.4.0.
>
> It is triggered by
> <http://svn.apache.org/viewvc?view=revision&revision=932875>
>
> but we haven't got any further than that yet. I'd be grateful for any input if
> this looks familiar to anyway.
>
> Test output follows:
>
> #112 registry/Execute.htm... <P>Here is some text</P>
> <table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
> <P>Transfer some vars Some Var !</P> <P>Transfer some vars Do it again
> !</P> <P>Use @param to transfer some data (1 2 3 4) !</P><P>Got data in
> @param (vara varb) !</P><P>Change data in @param to (newA newB)
> !</P><P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><t
> d>value</td></tr></table></P>
> Here it starts with some HTML Text<P>
>
> All values should be undefined at the first include and apear at the second
> include:
> <P>
>
> $a = <BR>
> $b = <BR>
> $c = <BR>
> $d = <BR>
> $e = <BR>
>
>
> First of all assign a value:
> <BR>
>
> Now we have some 'Umlaute':
>
>
> Now lets look what we are getting from this:<BR> (this is the value in $a) (this
> is the value in $a) &auml;&ouml;&uuml;<BR>
>
> And now a and b together: (this is the value in $a)(this is the value in $a)
> &auml;&ouml;&uuml;<P>
>
> Here we have some HTML tags within the perl code, Embperl will delete
> them!<BR>
>
> 57
> SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt; Here we have
> something which looks like a HTML tag, but does not start with<br> a
> character, Embperl does not change them!<BR>
>
> SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt; Embperl will also
> translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 will get the
> perl expression $a &lt; 6: <BR>
>
> 1
> Now they should have a value
>
> $a = (this is the value in $a) <BR>
> $b = (this is the value in $a) &auml;&ouml;&uuml; <BR> $c = 57 <BR> $d = 1
> <BR> $e = 2 <BR>
>
> <P>Ok.<P>
>
>
> <html>
> <head>
> <title>Test for $req_rec in Embperl</title> </head>
>
> $conf = &lt;undef&gt; <br>
> $_[0] = Embperl::Req=HASH(0x42625144) <br> $_[1] = &lt;undef&gt; <br>
>
> $rec_rec = Apache2::RequestRec=SCALAR(0x42625158)<br>
> $$rec_rec = 1107886848<br>
>
> Apache->request = Apache2::RequestRec=SCALAR(0x4262c194)<br>
> ${Apache->request} = 1107886848<br>
>
> ${Apache->request} = $$req_rec ? yes <br>
>
> /home/dom/debian/upstream/libembperl-perl/Embperl-
> 2.4.0/test/html/registry/Execute.htm
> </body>
> </html>
>
> Error in Line 4
> Is: ><H1>2.)IncludefrommemorywithsomeEmbperlcode</H1><
> Should: ><P>Hereissometext</P><
> Input: test/html/registry/Execute.htm
> Output: test/tmp/out.htm
> Compared to: test/cmp/Execute.htm
> Log: test/tmp/test.log
> Testparameter:
> modperl = 1
>
> ERRORS detected! NOT all tests have been passed successfully
>
> make: *** [test_dynamic] Terminated
> Terminated
>
> Cheers,
> Dominic.
>
> --
> Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5
> from the.earth.li (keyserver,web,email)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe [at] perl
> For additional commands, e-mail: embperl-help [at] perl



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


dom at earth

May 12, 2011, 7:53 AM

Post #3 of 5 (1267 views)
Permalink
Re: Test registry/Execute.htm fails with mod_perl 2.0.5 [In reply to]

On Thu, May 12, 2011 at 04:51:27PM +0200, richter [at] ecos wrote:
> Hi,
>
> could you tell me which version of perl do you use?
>
> I will take a look at the issue, but not before next week.

The problem was observed with both perl 5.10.1 and 5.12.3 (Debian
versions).

Dominic.

--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


richter at ecos

Jun 8, 2011, 12:08 PM

Post #4 of 5 (1150 views)
Permalink
RE: Test registry/Execute.htm fails with mod_perl 2.0.5 [In reply to]

Hi,

sorry for not getting back sooner...

I spent some time debugging this issue, but I don't have a solution so far.

The problem is, that mod_perl was using tied filehandles for STDOUT/IN before, but now it uses the Perl IO Layer.

The problem is in epio.c around line 716. There Embperl tries to get the handle or tied object for stdout. Mod_perl's stdout is neither since 2.0.5 and I didn't found a way how to get it in the C code so far...

I will continue looking at it, but I have limited time, so it might take some time, but it only affects Embperl as far as you use it inside of Registry scripts, all other usages should continue to work fine.


Gerald



> -----Original Message-----
> From: Dominic Hargreaves [mailto:dom [at] earth]
> Sent: Thursday, May 12, 2011 12:55 AM
> To: embperl [at] perl
> Subject: Test registry/Execute.htm fails with mod_perl 2.0.5
>
> As per the README I'm reporting this bug here, rather than on rt.cpan.org
> (where I note a few other bug reports have been sent).
>
> As reported at
> <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=624578> this test fails
> when run with mod_perl 2.0.5.
>
> We have applied some patches at Debian (you can see them at
> <http://svn.debian.org/wsvn/pkg-perl/trunk/libembperl-
> perl/debian/patches/#_trunk_libembperl-perl_debian_patches_>
> ) but I've reproduced the same problem with a plain unpatched Embperl
> 2.4.0.
>
> It is triggered by
> <http://svn.apache.org/viewvc?view=revision&revision=932875>
>
> but we haven't got any further than that yet. I'd be grateful for any input if
> this looks familiar to anyway.
>
> Test output follows:
>
> #112 registry/Execute.htm... <P>Here is some text</P>
> <table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
> <P>Transfer some vars Some Var !</P> <P>Transfer some vars Do it again
> !</P> <P>Use @param to transfer some data (1 2 3 4) !</P><P>Got data in
> @param (vara varb) !</P><P>Change data in @param to (newA newB)
> !</P><P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><t
> d>value</td></tr></table></P>
> Here it starts with some HTML Text<P>
>
> All values should be undefined at the first include and apear at the second
> include:
> <P>
>
> $a = <BR>
> $b = <BR>
> $c = <BR>
> $d = <BR>
> $e = <BR>
>
>
> First of all assign a value:
> <BR>
>
> Now we have some 'Umlaute':
>
>
> Now lets look what we are getting from this:<BR> (this is the value in $a) (this
> is the value in $a) &auml;&ouml;&uuml;<BR>
>
> And now a and b together: (this is the value in $a)(this is the value in $a)
> &auml;&ouml;&uuml;<P>
>
> Here we have some HTML tags within the perl code, Embperl will delete
> them!<BR>
>
> 57
> SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt; Here we have
> something which looks like a HTML tag, but does not start with<br> a
> character, Embperl does not change them!<BR>
>
> SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt; Embperl will also
> translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 will get the
> perl expression $a &lt; 6: <BR>
>
> 1
> Now they should have a value
>
> $a = (this is the value in $a) <BR>
> $b = (this is the value in $a) &auml;&ouml;&uuml; <BR> $c = 57 <BR> $d = 1
> <BR> $e = 2 <BR>
>
> <P>Ok.<P>
>
>
> <html>
> <head>
> <title>Test for $req_rec in Embperl</title> </head>
>
> $conf = &lt;undef&gt; <br>
> $_[0] = Embperl::Req=HASH(0x42625144) <br> $_[1] = &lt;undef&gt; <br>
>
> $rec_rec = Apache2::RequestRec=SCALAR(0x42625158)<br>
> $$rec_rec = 1107886848<br>
>
> Apache->request = Apache2::RequestRec=SCALAR(0x4262c194)<br>
> ${Apache->request} = 1107886848<br>
>
> ${Apache->request} = $$req_rec ? yes <br>
>
> /home/dom/debian/upstream/libembperl-perl/Embperl-
> 2.4.0/test/html/registry/Execute.htm
> </body>
> </html>
>
> Error in Line 4
> Is: ><H1>2.)IncludefrommemorywithsomeEmbperlcode</H1><
> Should: ><P>Hereissometext</P><
> Input: test/html/registry/Execute.htm
> Output: test/tmp/out.htm
> Compared to: test/cmp/Execute.htm
> Log: test/tmp/test.log
> Testparameter:
> modperl = 1
>
> ERRORS detected! NOT all tests have been passed successfully
>
> make: *** [test_dynamic] Terminated
> Terminated
>
> Cheers,
> Dominic.
>
> --
> Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5
> from the.earth.li (keyserver,web,email)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe [at] perl
> For additional commands, e-mail: embperl-help [at] perl



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl


dom at earth

Jun 8, 2011, 3:00 PM

Post #5 of 5 (1145 views)
Permalink
Re: Test registry/Execute.htm fails with mod_perl 2.0.5 [In reply to]

On Wed, Jun 08, 2011 at 09:08:37PM +0200, richter [at] ecos wrote:
> Hi,
>
> sorry for not getting back sooner...
>
> I spent some time debugging this issue, but I don't have a solution so far.
>
> The problem is, that mod_perl was using tied filehandles for STDOUT/IN before, but now it uses the Perl IO Layer.
>
> The problem is in epio.c around line 716. There Embperl tries to get the handle or tied object for stdout. Mod_perl's stdout is neither since 2.0.5 and I didn't found a way how to get it in the C code so far...
>
> I will continue looking at it, but I have limited time, so it might take some time, but it only affects Embperl as far as you use it inside of Registry scripts, all other usages should continue to work fine.

Hi Gerald,

Many thanks for taking the time to look at this. I'm quoting the whole
of your reply and copying in the relevant Debian bug report about the
issue, so that we can keep track of status, and perhaps see if anyone
is able to help with the fix from that side.

Cheers,
Dominic.

--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe [at] perl
For additional commands, e-mail: embperl-help [at] perl

ModPerl embperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.