angel flower wrote:
> With mod_perl, each subroutine in every Apache::Registry script is
> nested inside the handler subroutine.
That's true, but it didn't contribute to your problem. What Stas was
referring to in that writeup was a sub that is already nested before you
run it under Apache::Regi
I don't think closure is something that is something to avoid. When used
wisely (and perhaps with a bit of experience) it can be rather useful. I
have not used it myself, but I see the potential for it.
Thanks for the enlightenment Perrin.
- Original Message -
From: "John ORourke" <[EMAI
hi,
Sorry,when I read Stas Bekman's article again,I understand for that problem
which happened with me.
In fact,the script which I tested under mod_perl is wrapped into another
subroutine which is named as handler().The code that was actually executed:
package Apache::ROOT::perl::conference
I am having a strange problem with mod_perl/Apache::ASP
Randomly the mime type sent down to the browser is incorrect. This might be when the child processes its first request.
The content type is set to "text/html" and the header sent to the browser is:
Content-Type: text/plain; charset=UTF-8
I
With the reading of Apache_Clean module (which i see is streamed-oriented) and
with ideas
of Ambrosino, i am with this:
sub handler : FilterRequestHandler {
my($f, $bb) = @_;
my $rv;
unless ($f->ctx) {
$f->r->headers_out->unset('Content-Length');
$f->ctx({html => ''});
}
while (!$bb->is_emp
Yikes indeed :)
I should have clarified that in our app we don't actually process
embedded tags. Our app lets users mangle the source HTML using RegEx,
and since users can (and often do) perform filtering like
s/()(.*?)(<\/body>)/$1$2<\/center>$3/, we need to buffer
it all.
The main benefit I se
Jeff Ambrosino wrote:
> The way to deal with this is to buffer as much content as you need
> (maybe the whole page) and then do your work on the buffer.
yikes!
> Our
> application (HTTP output filter) buffers the stream as we go and
> stores it on the filter context ($f->ctx) across filter inv
The way to deal with this is to buffer as much content as you need
(maybe the whole page) and then do your work on the buffer. Our
application (HTTP output filter) buffers the stream as we go and
stores it on the filter context ($f->ctx) across filter invocations.
When we've seen $f->eos, then we
I'm just changing my old "handler:FilterRequestHandler" in
PerlOutputFilterHandler as it
is not working with my "new&fresh"mp2 compilation.
Then there's the question. What i want is to parse html pageswith an output
filter that
take special tags (<%special%>)and insert there some specific conte
Did you specificy mod_perl.pm as file to reload in the config by
accident?
No, it started happening just after the MP 2.0.0 RC5 upgrade...
This is what I got as a return from:
find /Users/boysie/mod_perl_inc /opt/local/lib/perl5 -name Reload.pm |
xargs grep -n mod_perl
20:use mod_perl2;
391:
Dear Mr. Philip M. Gollucci
Thanks a lot, I could get the script running.
But now I face a different problem. I want mod perl to be enabled for only
one virtual host but not all the virtual hosts in httpd. When I say,
loadmodules for mod_perl, modperl is activated for all the virtual host
Perrin Harkins wrote:
On Tue, 2005-10-18 at 20:50 +0530, [EMAIL PROTECTED] wrote:
I used
PerlResponseHandler Modperl::PerlRun
D'oh...
Good eye Perrin!
--
END
What doesn't kill us can only m
[EMAIL PROTECTED] wrote:
Thanks for the response Mr. Philip M. Gollucci.
I used
PerlResponseHandler Modperl::PerlRun
But it still wouldnot work . It gives the same kind of error again as under:-
[Tue Oct 18 20:40:25 2005] [error] [client 127.0.0.1] failed to resolve handler
`Modperl::Per
On Tue, 2005-10-18 at 20:50 +0530, [EMAIL PROTECTED] wrote:
> I used
> PerlResponseHandler Modperl::PerlRun
It's case-sensitive:
PerlResponseHandler ModPerl::PerlRun
- Perrin
Thanks for the response Mr. Philip M. Gollucci.
I used
PerlResponseHandler Modperl::PerlRun
But it still wouldnot work . It gives the same kind of error again as under:-
[Tue Oct 18 20:40:25 2005] [error] [client 127.0.0.1] failed to resolve handler
`Modperl::PerlRun': Can't locate Modperl/
On Tue, 2005-10-18 at 11:32 +0530, [EMAIL PROTECTED] wrote:
> I am encountering a strange problem with my mod perl 2.
[...]
>PerlHandler Apache::PerlRun
There is no module called Apache::PerlRun in mod_perl 2. It is now
called ModPerl::PerlRun. You will need
Perrin Harkins wrote:
Good guess, but that's not what is happening here. What our flowery
friend has stumbled onto is a closure. When a subroutine references a
"my" variable that was declared outside of that subroutine's scope, the
sub will keep a private copy of that variable. If it wasn't
On Tue, 2005-10-18 at 11:01 +0100, John ORourke wrote:
> 'my' means that it is local to the main program, so your subroutine
> won't see that version of "$counter". Your subroutine will create and
> access a global version of "$counter" which is separate and doesn't get
> re-initialised.
Good gues
angel flower wrote:
>
> Thanks.But I think your answer is not the one that I wanted.
http://perl.apache.org/docs/1.0/guide/porting.html#Sometimes_it_Works__Sometimes_it_Doesn_t
http://perl.apache.org/docs/general/perl_reference/perl_reference.html#myScoped_Variable_in_Nested_Subroutines
HT
Thanks.But I think your answer is not the one that I wanted.
From: John ORourke <[EMAIL PROTECTED]>
To: angel flower <[EMAIL PROTECTED]>
CC: modperl@perl.apache.org
Subject: [OT] Re: a new mod_perl problem
Date: Tue, 18 Oct 2005 11:01:47 +0100
Angel Flower,
'my' means that it is local to the
[EMAIL PROTECTED] wrote:
Dear Friends,
I am encountering a strange problem with my mod perl 2. I have installed mod perl 2 on apache and its using perl-5.8.6. I am using a server with two AMD 64 bit processors and 4 GB RAM. Initially I was using perl 5.8.6 in /usr/local/bin/perl configured wit
Angel Flower,
'my' means that it is local to the main program, so your subroutine
won't see that version of "$counter". Your subroutine will create and
access a global version of "$counter" which is separate and doesn't get
re-initialised.
You need to read up on 'my' and references - do "man perl
hi,
I am new to mod_perl.This is my first doubt,and I need some help.
I test this script under mod_perl:
#!/usr/bin/perl -w
use strict;
use warnings;
print "Content-type: text/plain\r\n\r\n";
my $counter = 0; # Explicit initialization technically redundant
for (1..5) {
incremen
Hi
Randy/other experts,
I
managed to fix the redirection problem. Following is a part of, what I think,
the offending script and its correction. The server seems to be working fine
now. I was changing the value of “location” when creating header of
the page in case of a redirect. This work
Thanks Fred. But that did not work. It did not find the file itself and
confused it with other websites configured on my server.
With warm regards.
Vivek J. Joshi.
[EMAIL PROTECTED]
Trikon electronics Pvt. Ltd.
--New opinions often appear first as jokes and fancies, then as blasphemies and
Hi Jonathan,
I don't know the Session:: stuff but it sounds like something I did with
DBI - I use persistent handlers so I needed my own custom version of
Apache2::DBI.
Why not subclass Session::MySQL and have the new() (or equivalent)
method do your validation on the handle before calling $
26 matches
Mail list logo