Re: [mp2] PerlAuthenHandler ->Internal_Redict question

2005-07-21 Thread Geoffrey Young
Bengt-Arne Fjellner wrote: > Hi. Im working on a modperl login module that amongst others will check for > https > If not https I want to give an error page instead. you'll need something like Apache::SSLLookup to determine https during the authen phase. > Is it possible to return html from an

[mp2] PerlAuthenHandler ->Internal_Redict question

2005-07-21 Thread Bengt-Arne Fjellner
Hi. Im working on a modperl login module that amongst others will check for https If not https I want to give an error page instead. Is it possible to return html from an authen handler ? How? Is it possible to create a temporary ... from this handler? Or give an internal_redirect directly to c

CGI::Carp

2005-07-21 Thread Arshavir Grigorian
Hello list, Not sure when this started happening, but at some point calling CGI::Carp::carp() started resulting in deep recursion within CGI::Carp::warn() eventually killing the process. I think the recursion is caused by the following: $main::SIG{__WARN__}=\&CGI::Carp::warn; sub realwarn {

[mp2] Help with saslauthd module name please

2005-07-21 Thread Bengt-Arne Fjellner
Hi. Im working on a modperl login module that uses saslauthd to login. (thats cyrus-sasl) Do you know if there already exists one? if so where? Otherwise what would be a good name? Im planning to drop it on CPAN if there isnt one. It will normally demand that you use https. otherwise it drops you

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
Geoffrey Young wrote: > anyway, when I was doing the part on method handlers for the mod_perl > cookbook I said "$self is always the name of the class" and IIRC stas > pointed me to that example so I changed the wording to "usually." but > I've > never seen it used in real life like that - certai

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Geoffrey Young
> And I've never seen a situation where 'self was a ref' > could you please enlighten me. the vast majority of the time $self is the class name, since you generally see this kind of config PerlResponseHandler My::Class->handler http://perl.apache.org/docs/1.0/guide/method_handlers.html#Simple

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
Geoffrey Young wrote: >> sub handler : method { >> my ($self,$r) = @_; >> $self = $self->new unless ref $self; >> $self->{r} = $r; >> } >> >> When exactly is this ref used? AFAIK $_[0] will never be a reference. > it will when you use the :method attribute :) > in short,

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Geoffrey Young
Jonathan Vanasco wrote: > > It was annoying to get my head around this. the 'magic' part of it > holds true and makes it confusing. > > for the longest time, i would just print $var, ref $var and other stuff > to STDERR to try and get my head around it > > I never quite did completely underst

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Jonathan Vanasco
It was annoying to get my head around this. the 'magic' part of it holds true and makes it confusing. for the longest time, i would just print $var, ref $var and other stuff to STDERR to try and get my head around it I never quite did completely understand it, but doing the above trained

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Geoffrey Young
> sub handler : method { > my ($self,$r) = @_; > $self = $self->new unless ref $self; > $self->{r} = $r; > } > > When exactly is this ref used? AFAIK $_[0] will never be a reference. it will when you use the :method attribute :) in short, it's magic - run the handler an

[mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
Hi, >From the practical mod_perl book (focuses on mp 1.x though): sub new { bless {}, shift; } #mp1.x uses sub handler($$) {} sub handler : method { my ($self,$r) = @_; $self = $self->new unless ref $self; $self->{r} = $r; } When exactly is this ref used? AFAIK

Re: Output leaking from one session to another?

2005-07-21 Thread Joost N
On 7/21/05, Perrin Harkins <[EMAIL PROTECTED]> wrote: > > Could there be a problem that the output buffer of a previous request > > is not flushed completely (due to a broken connection perhaps), so > > that part of the output gets sent to the next client of the same > > process? > > I don't think

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-21 Thread Stas Bekman
Tim Esselens wrote: Malcolm J Harwood wrote: Ah, i see, but then my question remains, why is this location changed after n hits (n = # of apache children) Just a stab in the dark: If you have a completely round-robin series of hits (ie. each child is hit once in order before any child is hit

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-21 Thread Tim Esselens
Malcolm J Harwood wrote: >> Ah, i see, but then my question remains, why is this location changed >> after n hits (n = # of apache children) > Just a stab in the dark: > If you have a completely round-robin series of hits (ie. each child is hit > once in order before any child is hit twice). > T

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-21 Thread Malcolm J Harwood
On Wednesday 20 July 2005 01:58 pm, Tim Esselens wrote: > Tom Schindl wrote: > >> You're right, I've should have printed $r, which yields: > >> > >> Apache2::RequestRec=SCALAR(0x9d44644) [first n times] > >> Apache2::RequestRec=SCALAR(0x9d7e0a4) > >> (n begin the number of apache children) > >> >

Re: Output leaking from one session to another?

2005-07-21 Thread Perrin Harkins
Joost N wrote: Our website gets hundreds of hits per minute on busy times and has been happily running mod_perl for about 4 years now, without any problem, so I suspect it has something to do with the upgrade earlier that day. It's a logical conclusion, but I doubt it. I can't think of anythin

Output leaking from one session to another?

2005-07-21 Thread Joost N
Hello, Yesterday morning our ISP upgraded our debian server to Apache/1.3.33 and mod_perl/1.29. Yesterday evening we got a report of a visitor who claimed to have seen another visitor's data. Inspecting the access log indeed shows that this visitor had clicked on hyperlinks that he should not have

Re: The mod_perl protocol handler sample code have some problem!

2005-07-21 Thread Stas Bekman
LUKE wrote: Thanks! But the problem is still exist. The sample code have some problem. When i telnet then CommandServer in win32 everything is ok. But if i close then console window(terminal) immediate, the apache is hang. CPU use 100% resource. I try to use $c->aborted() OR ($@ == APR::Co

Re: The mod_perl protocol handler sample code have some problem!

2005-07-21 Thread LUKE
Thanks! But the problem is still exist. - Original Message - From: "Randy Kobes" <[EMAIL PROTECTED]> To: "薛共和" <[EMAIL PROTECTED]> Cc: Sent: Thursday, July 21, 2005 12:47 PM Subject: Re: The mod_perl protocol handler sample code have some problem! On Thu, 21 Jul 2005, [big5] [EMAIL PR

Re: BerkelyDB problem - seg fault 11

2005-07-21 Thread Rick Jansen
I solved the prob I had some time ago (see below) by adding "PerlModule BerkeleyDB" to the httpd.conf: ... # Load Apache::Registry PerlModule Apache::Registry # Load Berkeley DB PerlModule BerkeleyDB ... It runs fine now. But I'm not exactly sure what went wrong in the old situation

Re: mod_perl2 and Attribute::Handlers?

2005-07-21 Thread Stas Bekman
Stephen Quinney wrote: I have been attempting to use some code that utilises the Attribute::Handlers module within mod_perl2 without success. I know the modules work perfectly outside of the mod_perl2 environment. I am aware that there are issues with this as it is doing work at the CHECK phase a