[mp2] HTML::Mason and Missing content

2008-04-07 Thread Robert Landrum
We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2 
that only affects a few of our files.  I'm able to reproduce it reliably.


We have a custom handler method that handles all requests to our site by 
passing them off to HTML::Mason (with exceptions for images, and the like).


On some pages, the first few lines of HTML output are missing.  If I add 
a newline to the very first line of the mason component, all of the 
content appears (see below).  This has led me to believe that the issue 
is related to headers.  Something is eating the first few lines of all 
out our output up until the the first blank line.


Those lines however, do not appear in the header output of the request, 
though.  They just seem to disappear somewhere inside apache2.2.


Has anyone seen this problem before?  We didn't experience it under MP1.

Thanks,

Rob

-
foo.mc:
-- START --


Foo File


Testing Apache 2.2: <% $now %>



<%init>
my $now = scalar localtime;


<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0

-- END --


Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:41:48 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3 
Perl/v5.8.7

Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:41:48 GMT
Client-Peer: XXX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked





-
foo_fixed.mc:
-- START --



Foo File


Testing Apache 2.2: <% $now %>



<%init>
my $now = scalar localtime;


<%attr>
no_formatting=>1
menubar=>0
navbar=>0
footer=>0
subnav=>0

-- END --


Output:
-- START --
Connection: close
Date: Mon, 07 Apr 2008 18:43:04 GMT
Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3 
Perl/v5.8.7

Content-Type: text/html
Client-Date: Mon, 07 Apr 2008 18:43:04 GMT
Client-Peer: XX
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Title: Foo File



Foo File


Testing Apache 2.2: Mon Apr  7 14:43:04 2008





-- END --



what handler phase as we in?

2008-04-07 Thread Anthony R Fletcher
I have a module that does authentication and authorisation. In my Apache
configs I have:

PerlAuthenHandler Apache2::AuthX::authenticate
PerlAuthzHandler  Apache2::AuthX::authorise

I'd rather just use:

PerlAuthenHandler Apache2::AuthX
PerlAuthzHandler  Apache2::AuthX

and let the handler function Apache2::AuthX::handler() deduce what has
to be done (i.e. authenticate or authorise).

How can handlers tell which phase they are currently in?

Anthony.



Re: what handler phase as we in?

2008-04-07 Thread Philippe M. Chiasson

Anthony R Fletcher wrote:

I have a module that does authentication and authorisation. In my Apache
configs I have:

PerlAuthenHandler Apache2::AuthX::authenticate
PerlAuthzHandler  Apache2::AuthX::authorise

I'd rather just use:

PerlAuthenHandler Apache2::AuthX
PerlAuthzHandler  Apache2::AuthX

and let the handler function Apache2::AuthX::handler() deduce what has
to be done (i.e. authenticate or authorise).


You do end up paying a small overhead in forcing that determination at
run time in your code, but I agree it's somewhat neater.


How can handlers tell which phase they are currently in?


ModPerl::Util::current_callback()

http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_current_callback_

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/   m/gozer\@(apache|cpan|ectoplasm)\.org/



signature.asc
Description: OpenPGP digital signature


Re: [RELEASE CANDIDATE] mod_perl-2.0.4 RC1

2008-04-07 Thread Philippe M. Chiasson

Jie Gao wrote:

uname -a

SunOS XXX 5.10 Generic_127111-10 sun4u sparc SUNW,Sun-Fire-V240

[...]


gmaek test


All tests successful, 8 tests and 13 subtests skipped.
Files=238, Tests=2559, 238 wallclock secs (180.48 cusr + 31.92 csys = 212.40 
CPU)
[warning] root mode: restoring the original files ownership
[warning] server localhost:8529 shutdown
cd ModPerl-Registry && make test
/usr/local/bin/perl -I../blib/arch -I../blib/lib \
t/TEST  -clean
APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= 
APACHE_TEST_APXS= \
/usr/local/bin/perl -I../blib/arch -I../blib/lib \
t/TEST  -bugreport -verbose=0 
[warning] root mode: changing the files ownership to 'nobody' (60001:60001)

[warning] testing whether 'nobody' is able to -rwx 
/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t
"/usr/local/bin/perl" 
-Mlib=/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/../../Apache-Test/lib 
-MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 60001, 
q[/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t]) }';


[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
/usr/local/httpd-2.2.8+mod_perl-2.0.4-rc1/bin/httpd  -d /opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t -f /opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/conf/httpd.conf -D APACHE2 
using Apache/2.2.8 (prefork MPM)


waiting 90 seconds for server to start: 
waiting 90 seconds for server to start: ok (waited 3 secs)
server localhost:8529 started
t/206ok  
t/304ok  
t/404ok  
t/500ok  
t/bad_scriptsok  
t/basic..ok  
t/bin_resp...ok  
t/cgiok  
t/closureok  
t/dirindex...ok  
t/fatalstobrowserskipped

all skipped: fatalsToBrowser known not to work, CGI version 99.99 or 
higher is required
t/flush..ok  
t/ithreads...skipped

all skipped: perl 5.8.1 or higher w/ithreads enabled is required
t/nphok  
t/perlrun_extload# Failed test 1 in t/perlrun_extload.t at line 17
t/perlrun_extloadFAILED test 1   
Failed 1/2 tests, 50.00% okay


Any chance you can run

cd ModPerl-Registry && t/TEST -run -v t/perlrun_extload

And post the verbose output. Also, is there anything in 
ModPerl-Registry/t/log/error_log that's
possibly relevant ?

--
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/   m/gozer\@(apache|cpan|ectoplasm)\.org/



signature.asc
Description: OpenPGP digital signature


[ANNOUNCE] Smolder 1.21

2008-04-07 Thread Michael Peters
Smolder 1.21 has just been released thanks to the Oslo Perl QA Workshop and my
trip sponsored by Oslo.pm and Linpro. This releases fixes several installation
bugs on various platforms and other small bugs. It also adds several new
features. The highlights are:

+ Project categories have now been replaced by the more flexible smoke report 
tags
+  TAP archives can now be downloaded through the UI for a given report
+ Graphs can now be done on test run duration if that info was provided in the
archive. This was inspired by Ovid's work on the BBC's test suite's run time.
+ The default DB-Platform is now SQLite instead of MySQL

See the changle log for full details.
http://sourceforge.net/projects/smolder

-- 
Michael Peters
Plus Three, LP



Re: what handler phase as we in?

2008-04-07 Thread Anthony R Fletcher
Hello Philippe

Perfect - thanks.

Anthony

On 07 Apr 2008 at 16:39:02, Philippe M. Chiasson wrote:
> Anthony R Fletcher wrote:
>> I have a module that does authentication and authorisation. In my Apache
>> configs I have:
>>
>>  PerlAuthenHandler Apache2::AuthX::authenticate
>>  PerlAuthzHandler  Apache2::AuthX::authorise
>>
>> I'd rather just use:
>>
>>  PerlAuthenHandler Apache2::AuthX
>>  PerlAuthzHandler  Apache2::AuthX
>>
>> and let the handler function Apache2::AuthX::handler() deduce what has
>> to be done (i.e. authenticate or authorise).
>
> You do end up paying a small overhead in forcing that determination at
> run time in your code, but I agree it's somewhat neater.
>
>> How can handlers tell which phase they are currently in?
>
> ModPerl::Util::current_callback()
>
> http://perl.apache.org/docs/2.0/api/ModPerl/Util.html#C_current_callback_
>
> -- 
> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/   m/gozer\@(apache|cpan|ectoplasm)\.org/
>



-- 
Anthony R Fletcher
  Room 2033, Building 12A,http://dcb.cit.nih.gov/~arif
  National Institutes of Health,  [EMAIL PROTECTED]
  12A South Drive, Bethesda,  Phone: (+1) 301 402 1741.
  MD 20892-5624, USA.


Re: [RELEASE CANDIDATE] mod_perl-2.0.4 RC1

2008-04-07 Thread Jie Gao
* Philippe M. Chiasson <[EMAIL PROTECTED]> wrote:

> Jie Gao wrote:
> >>uname -a
> >SunOS XXX 5.10 Generic_127111-10 sun4u sparc SUNW,Sun-Fire-V240
> >
> >[...]
> >
> >>gmaek test
> >
> >All tests successful, 8 tests and 13 subtests skipped.
> >Files=238, Tests=2559, 238 wallclock secs (180.48 cusr + 31.92 csys = 
> >212.40 CPU)
> >[warning] root mode: restoring the original files ownership
> >[warning] server localhost:8529 shutdown
> >cd ModPerl-Registry && make test
> >/usr/local/bin/perl -I../blib/arch -I../blib/lib \
> >t/TEST  -clean
> >APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= 
> >APACHE_TEST_APXS= \
> >/usr/local/bin/perl -I../blib/arch -I../blib/lib \
> >t/TEST  -bugreport -verbose=0 
> >[warning] root mode: changing the files ownership to 'nobody' (60001:60001)
> >[warning] testing whether 'nobody' is able to -rwx 
> >/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t
> >"/usr/local/bin/perl" 
> >-Mlib=/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/../../Apache-Test/lib
> > -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 
> >60001, q[/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t]) }';
> >
> >
> >[warning] result: OK
> >[warning] the client side drops 'root' permissions and becomes 'nobody'
> >/usr/local/httpd-2.2.8+mod_perl-2.0.4-rc1/bin/httpd  -d 
> >/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t -f 
> >/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/conf/httpd.conf -D 
> >APACHE2 using Apache/2.2.8 (prefork MPM)
> >
> >waiting 90 seconds for server to start: 
> >waiting 90 seconds for server to start: ok (waited 3 secs)
> >server localhost:8529 started
> >t/206ok
> >t/304ok
> >t/404ok
> >t/500ok
> >t/bad_scriptsok
> >t/basic..ok
> >t/bin_resp...ok
> >t/cgiok
> >t/closureok
> >t/dirindex...ok
> >t/fatalstobrowserskipped
> >all skipped: fatalsToBrowser known not to work, CGI version 99.99 
> >or higher is required
> >t/flush..ok
> >t/ithreads...skipped
> >all skipped: perl 5.8.1 or higher w/ithreads enabled is required
> >t/nphok
> >t/perlrun_extload# Failed test 1 in t/perlrun_extload.t at line 17
> >t/perlrun_extloadFAILED test 1 
> >Failed 1/2 tests, 50.00% okay
> 
> Any chance you can run
> 
> cd ModPerl-Registry && t/TEST -run -v t/perlrun_extload
> 
> And post the verbose output. Also, is there anything in 
> ModPerl-Registry/t/log/error_log that's
> possibly relevant ?
 
> cd ModPerl-Registry && t/TEST -run -v t/perlrun_extload
[warning] root mode: changing the files ownership to 'nobody' (60001:60001)
[warning] testing whether 'nobody' is able to -rwx 
/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t
"/usr/local/bin/perl" 
-Mlib=/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/../../Apache-Test/lib
 -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 60001, 
q[/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t]) }';


[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
[  error] server is not ready yet, try again.
> cd ModPerl-Registry && t/TEST -run -v t/perlrun_extload
bash: cd: ModPerl-Registry: No such file or directory
> t/TEST -run -v t/perlrun_extload
[warning] root mode: changing the files ownership to 'nobody' (60001:60001)
[warning] testing whether 'nobody' is able to -rwx 
/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t
"/usr/local/bin/perl" 
-Mlib=/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/../../Apache-Test/lib
 -MApache::TestRun -e 'eval { Apache::TestRun::run_root_fs_test(60001, 60001, 
q[/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t]) }';


[warning] result: OK
[warning] the client side drops 'root' permissions and becomes 'nobody'
[  error] server is not ready yet, try again.
> chown -R nobody t
> t/TEST -run -v t/perlrun_extload
[warning] root mode: changing the files ownership to 'nobody' (60001:60001)
[warning] testing whether 'nobody' is able to -rwx 
/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t
"/usr/local/bin/perl" 
-Mlib=/opt/local/src/mod_perl-2.0.4-rc1/ModPerl-Registry/t/../../Apache-Test/lib
 -MApache::TestRun -e 'eval { Apa

Re: [mp2] HTML::Mason and Missing content

2008-04-07 Thread Felipe de Jesús Molina Bravo
Hi

how did you installed modperl ... static or dinamic?

It can be a solution (change from static to dinamic), maybe you help the
next link

http://www.masonhq.com/?FAQ:Installation#h-why_am_i_getting_segmentation_faults__or_silently_failing_on_startup__


regards

felipe




2008/4/7, Robert Landrum <[EMAIL PROTECTED]>:
>
> We're seeing some very strange behavior with HTML::Mason/Apache 2.2/MP2
> that only affects a few of our files.  I'm able to reproduce it reliably.
>
> We have a custom handler method that handles all requests to our site by
> passing them off to HTML::Mason (with exceptions for images, and the like).
>
> On some pages, the first few lines of HTML output are missing.  If I add a
> newline to the very first line of the mason component, all of the content
> appears (see below).  This has led me to believe that the issue is related
> to headers.  Something is eating the first few lines of all out our output
> up until the the first blank line.
>
> Those lines however, do not appear in the header output of the request,
> though.  They just seem to disappear somewhere inside apache2.2.
>
> Has anyone seen this problem before?  We didn't experience it under MP1.
>
> Thanks,
>
> Rob
>
> -
> foo.mc:
> -- START --
> 
> 
> Foo File
> 
> 
> Testing Apache 2.2: <% $now %>
> 
> 
>
> <%init>
> my $now = scalar localtime;
> 
>
> <%attr>
> no_formatting=>1
> menubar=>0
> navbar=>0
> footer=>0
> subnav=>0
> 
> -- END --
>
>
> Output:
> -- START --
> Connection: close
> Date: Mon, 07 Apr 2008 18:41:48 GMT
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
> Perl/v5.8.7
> Content-Type: text/html
> Client-Date: Mon, 07 Apr 2008 18:41:48 GMT
> Client-Peer: XXX
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
>
>
>
>
>
>
> -
> foo_fixed.mc:
> -- START --
>
> 
> 
> Foo File
> 
> 
> Testing Apache 2.2: <% $now %>
> 
> 
>
> <%init>
> my $now = scalar localtime;
> 
>
> <%attr>
> no_formatting=>1
> menubar=>0
> navbar=>0
> footer=>0
> subnav=>0
> 
> -- END --
>
>
> Output:
> -- START --
> Connection: close
> Date: Mon, 07 Apr 2008 18:43:04 GMT
> Server: Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.7m mod_perl/2.0.3
> Perl/v5.8.7
> Content-Type: text/html
> Client-Date: Mon, 07 Apr 2008 18:43:04 GMT
> Client-Peer: XX
> Client-Response-Num: 1
> Client-Transfer-Encoding: chunked
> Title: Foo File
>
> 
> 
> Foo File
> 
> 
> Testing Apache 2.2: Mon Apr  7 14:43:04 2008
> 
> 
>
>
>
> -- END --
>
>