27;} = $cookie;
> #$r->headers_out->{'Location'} = $url;
> Location is the perl handler 'localhost/pageB/' (perl handler), if you then go
> to localhost/pageA (or simply click BACK button) then the browser DO see
> the cookie!
>
> Any idea?
Yep. You need $r->err_headers_out->{'Location'} and you could change to
$r->err_headers_out->{'Set-Cookie'} too.
- nick
--
Nick Tonkin {|8^)>
Michael G Schwern <[EMAIL PROTECTED]> writes:
>On Mon, Aug 04, 2003 at 11:19:42AM +0100, Steve Hay wrote:
>> Why isn't the typemap file distributed as part of ExtUtils-MakeMaker?
>
>typemap is very specific to the version of Perl, or so it is said.
Not really. There are some changes for PerlIO * v
rting/porting.html and just
follow every link from there.
> here is the code from Apache::compat
Most of us already have that :)
- nick
--
Nick Tonkin {|8^)>
so the two could be replace each other.
I sure hope not! I second John Siracusa's post on this. Keep the HTML generation well
away from request parsing, please!
- nick
--
Nick Tonkin {|8^)>
for prime time? We haven't been able to get
> it running here (some sort of install problem, my people tell me).
Not at all ready. I do not believe even a beta release has been made.
- nick
--
~~~~
Nick Tonkin {|8^)>
I
> suspect that doug left it out on purpose - IIRC PerlSwitches was his
> answer when this was asked before (maybe it was at a conference, I
> can't remember).
I think Doug was right. PerlSwitches is a more flexible, more perlsih and
mod_perlish way of doing it, IMO. Just needs good documentation :)
- nick
--
Nick Tonkin {|8^)>
indows apps install
themselves wherever they feel like it :)
- nick
--
Nick Tonkin {|8^)>
'TIEHANDLE'
try one of:
use Apache::RequestIO ();
use Apache::Filter ();
>From there you could probably guess that the module you need to load is
Apache::RequestIO, right?
HTH,
- nick
--
Nick Tonkin {|8^)>
ver will return a redirect to
http://yourdomain.com/some/path/index.html, which will cause tha access
handler to be invoked a second time.
> Ideally I would like to find someway to trace the who/what/where/why of
> handler execution. Running with PERL_TRACE left me none the wiser so I was
> hoping a user might know a better way?
>
> Richard.
>
- nick
--
Nick Tonkin {|8^)>
e there may be other
handlers that need to work on the request. And if not now, maybe in the
future.
- nick
--
Nick Tonkin {|8^)>
I said this. This only happens when a 403 happens and
> the user is sent to the /login location. So my actual AccessHandler doesn't
> do anything which even resembles a subrequest.
can you post the handler?
- nick
--
Nick Tonkin {|8^)>
.t when reconfigured to use
TesHooks::access for -- watch out for this, all.
- nick
--
Nick Tonkin {|8^)>
use if it will, I can probably settle
> for args() and content() now, and use my own parser until
> Apache::Request shows up.)
CGI.pm should be able to do all of the above and many of its methods
are the same as Apache::Request's.
HTH,
- nick
--
Nick Tonkin {|8^)>
D'oh, please s/Apache::Filter/Apache::Sandwich/ in my earlier reply.
Sorry.
- nick
--
Nick Tonkin {|8^)>
t stuck, and the
documentation for porting is getting quite extensive.
This doc: http://perl.apache.org/docs/2.0/devel/porting/porting.html is
what you want.
Good luck,
- nick
--
Nick Tonkin {|8^)>
On Mon, 10 Mar 2003 [EMAIL PROTECTED] wrote:
> Hi -
>
> I'm getting frustrated. I'm trying to parse the
> incoming uri (url) in mod_perl 2, and I can't
> seem to be able to find documentation. For
> example, Nick gave me the following snippet
> of code last w
dard https port) will have to specify the port in the
request.
I suggest spending some time with the docs for mod_ssl, if that's what
you're using.
- nick
--
Nick Tonkin {|8^)>
port 80, and all links on
secure.my_domain.com will point to https://secure. on port 443. The server
will simply rewrite and redirect all links that do not match either
/secure/ or !/secure.
Hope this helps,
- nick
PS If you have more than one domain needing to use https, you can put it
on an arbitrary port so long as you configure the server (not apache) to
listen on it, and then hard-code the port number in the mod_rewrite rule.
--
Nick Tonkin {|8^)>
On Thu, 6 Mar 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > On Wed, 5 Mar 2003, Richard Clarke wrote:
> >
> >
> >>Hi,
> >>I'm trying to figure out why my accesshandler is getting triggered twice
> >>for each request that I make.
On Thu, 6 Mar 2003, Mark James wrote:
> Nick Tonkin wrote:
>
> > Now that I think about it, maybe you're using CGI.pm to do your redirect?
> > If so, maybe the code in CGI.pm has not been correctly updated?
>
> Yes Nick, I'm using CGI.pm version 2.91 (the lat
in
how the httpd.conf auth* directives are specified, but I've never had the
time to really muck around with them.
- nick
--
Nick Tonkin {|8^)>
onf auth* directives are specified, but I've never had the
time to really muck around with them.
- nick
--
Nick Tonkin {|8^)>
ou will have
# to do with any other headers you want to have sent with the
# redirect, such as cookies
return Apache::HTTP_MOVED_TEMPORARILY;
# Apache::REDIRECT still supported, this is the correct
# constant though.
Now that I think about it, maybe you're using CGI.pm to d
ve
with CGI.pm, just like when you were a young man and the web was even
younger :)
- nick
--
~~~~
Nick Tonkin {|8^)>
gt; > is usually a need to talk to an external data database with a
> > site-specific schema. The result is that plug and play auth schemes
> > only work (unmodified) for the simplest sites.
>
> Anyone using PubCookie?
>
> http://www.washington.edu/pubcookie/
All C, no?
- nick
--
Nick Tonkin {|8^)>
curity are paramount, this is not a bad thing. And really, in my
system, the UI modules only need to know the user's authz level (0-4) to
produce content ... they do not care how the authz level was generated.
- nick
--
Nick Tonkin {|8^)>
D is almost certainly a bad idea.
What was the idea behind
return DECLINED if $r->is_inital_req;
in auth handlers in the first place?
- nick
--
Nick Tonkin {|8^)>
le there. By
the time you get up to speed mp2 might be closer to its final version ...
- nick
--
Nick Tonkin {|8^)>
are all loaded into a hashref and
stored in the serverside session. An encrypted cookie has the key to the
session.
All of this is tied into the UI such that the user's authz level
determines the content they see. Data such as '$student->first_name' are
displayed by a UI handle
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Stas Bekman wrote:
> > Nick Tonkin wrote:
> [...]
> >> send_http_header() can't be called before the response phase
>
> Nick, I've just committed a better solution. Please verify that it works for you.
Now that the
On Wed, 19 Feb 2003, Nick Tonkin wrote:
>
> Hi all,
>
> Cookies driving me nuts as usual but I think the problem appears to be
> related to which handler phase we are in.
>
> Basically, the same call to read the cookies works in the PerlHandler but
> not in the PerlAcces
like:
# startup.pl
use Apache2 ();
use Apache::compat ();
use Apache::RequestRec ();
1;
and would probably grow from there. My startup.pl for the new
httpd2/mod_perl2 installation I am building so far looks like:
nick@world ~>cat /home/www/_conf/startup.pl
use lib 'home/nick/perl'
in mp1 ... it
simplyreturns a string that you would need to parse yourself (where it
used to return an array if called in array context) ... see
http://perl.apache.org/docs/2.0/user/compat/compat.html#C__r_E_gt_args__in_an_Array_Context
for more information.
- nick
--
Nick Tonkin {|8^)>
On Fri, 21 Feb 2003, Stas Bekman wrote:
> Ged Haywood wrote:
> > On Thu, 20 Feb 2003, Nick Tonkin wrote:
> >
> >
> >>Hi,
> >>
> >>In my logs when dumping a warn() I see this occasionally:
> >>
> >>192.168.0.24 at /home/wm/perl/WM
245.
192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28.
192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28.
Anyone know what is and why it appears every so often?
Thanks,
- nick
--
Nick Tonkin {|8^)>
If the cookies are being sent to the browser, they'll be there. If they
are and it's still not working, you need to look at the reading of the
cookies in your module.
- nick
--
Nick Tonkin {|8^)>
rom text/plain to text/html and voila --
I don't have to set $r->content_type after all but rather can just delete
all the $r->send_http_headers calls.
YMMV, of course, if you have other parts of your webserver that do not
supply a content-type :)
- nick
--
Nick Tonkin {|8^)>
log.
Just a heads-up.
- nick
--
~~~~
Nick Tonkin {|8^)>
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> >
> > On Thu, 20 Feb 2003, Stas Bekman wrote:
> >
> >
> >>Nick Tonkin wrote:
> >>
> >>>server_hostname is not documented on the list. Anyone know the equivalent
> >>&g
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > Hi all,
> >
> > I my httpd.conf I have:
> >
> >
> > AddType text/html .html
> > PerlAccessHandler WM::Auth::Access
> >
> >
> > And in m
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > Is it possible to combine the recommended syntax:
> >
> > use warnings FATAL => 'all', NONFATAL => 'redefine';
> >
> > with the ability to turn warnings on in httpd.c
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > server_hostname is not documented on the list. Anyone know the equivalent
> > please?
>
> it hasn't changes from 1.0. I thought we have been through this already, just
> yesterday.
We did. The list is
h start before the first one apparently
gets to the conditional?
3) Why is a simple request like that not the is_initial_req
4) If the first time through it reurns DECLINED because it's "not an
initial req", how come it goes through again?
5) What the heck is going on here?
Thanks,
- nick
Nick Tonkin {|8^)>
Is it possible to combine the recommended syntax:
use warnings FATAL => 'all', NONFATAL => 'redefine';
with the ability to turn warnings on in httpd.conf with PerlSwitches -w?
- nick
Nick Tonkin {|8^)>
server_hostname is not documented on the list. Anyone know the equivalent
please?
- nick
On Thu, 20 Feb 2003, Stas Bekman wrote:
> Stas Bekman wrote:
> > Nick Tonkin wrote:
> [...]
> >> send_http_header() can't be called before the response phase
>
> Nick, I've just committed a better solution. Please verify that it works for you.
I
patible; MSIE 5.5; Windows NT 5.0)
Host: wm.tonkinresolutions.com
Connection: Keep-Alive
Cookie: foo=bar;
remembered_uri=https%3A%2F%2Fwm.tonkinresolutions.com%2Findex.html;
auth=hash&6032ccbfd909f951dcfbd804441163bc&group_name&root&session&580a5fc6a0215f2eaecde2e6d5554b07&user&am
$r->content_type('text/html');
$r->send_http_header;
[...]
This throws the error:
send_http_header() can't be called before the response phase
Thanks,
- nick
--
~~~~
Nick Tonkin {|8^)>
On Wed, 19 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > On Wed, 19 Feb 2003, Stas Bekman wrote:
> >
> >
> >>Nick Tonkin wrote:
> >>
> >>>Does anyone know the equivalent directive for
> >>>$r->server()->server_host
On Wed, 19 Feb 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > Does anyone know the equivalent directive for
> > $r->server()->server_hostname()
>
> it's right there:
>
> use Apache::Server;
> $r->server->server_name;
Well, it doesn't wor
t but I may have to focus on getting a 1.x
installation built on this box ...
- nick
--
Nick Tonkin {|8^)>
Does anyone know the equivalent directive for
$r->server()->server_hostname()
?
Thanks,
- nick
--
~~~~
Nick Tonkin {|8^)>
perl&r=1&w=2
The message you want is
http://marc.theaimsgroup.com/?l=apache-modperl&m=104225578207460&w=2
- nick
Nick Tonkin {|8^)>
earned in mod_perl 2 that Apache::Constants was replaced by 3 new
> classes (Apache::Const,APR::Const,Modperl::Const).
>
> But what do I do to get Apache::DBI to work?
> Am I missing something really simple here (I hope)?
>
> Thanks
> -Chris
>
>
>
- nick
Nick Tonkin {|8^)>
as well get
it now since you are upgrading those packages too. perl 5.6.1 eould also
be fine; perl 5.6.0 has problems.
HTH,
- nick
Nick Tonkin {|8^)>
On Fri, 31 Jan 2003, Lee Goddard wrote:
> Does anyone know when this module might be released?
No, no one does. They are working on it. Use CGI.pm instead or revert to
mod_perl/apache version 1 until it is done.
- nick
Nick Tonkin {|8^)>
od_perl ?
>
> Thanks!
> Ilia Chipitsine
>
>
Have you read the mod_perl guide? Especially
http://perl.apache.org/docs/1.0/guide/install.html#Installation_Scenarios_for_mod_perl_and_Other_Components
?
- nick
Nick Tonkin {|8^)>
ake && make test && make install
This builds flawlessly on my system which is FreeBSD 4.7 and perl 5.8
> I found one in debian unstable, but this requires perl 5.8.
I can't say about other perls, as I said I have 5.8
HTH
- nick
Nick Tonkin {|8^)>
nce MySQL provides
excellent support.
Ask, can you block this bozo from the list?
- nick
~~~~
Nick Tonkin {|8^)>
, and it was just not
possible to keep up with apache 1.3x. We wound up having just one machine
running thttpd serving all those images for 50 or a hundred webservers.
So sometimes I believe it's called for.
- nick
Nick Tonkin {|8^)>
nt=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat
On Sun, 19 Jan 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > On Fri, 17 Jan 2003, Nick Tonkin wrote:
> >
> >
> >>Hey all,
> >>
> >>Building the latest mp2 I get:
> >>protocol/echo_filter.ok
On Fri, 17 Jan 2003, Nick Tonkin wrote:
>
> Hey all,
>
> Building the latest mp2 I get:
> protocol/echo_filter.ok
> Failed Test Stat Wstat Total Fail Fail
17 20:03:55 2003] [notice] caught SIGTERM, shutting down
END in modperl_extra.pl, pid=62235
I have perl 5.8 on FreeBSD 4.7 with latest apache2 as of today.
Thanks,
- nick
Nick Tonkin {|8^)>
> which mentions all the probs in the prefork mpm section. Obviously the
> threaded-mpm requires threads.
Looks better to me. More clear.
-nick
~~~~
Nick Tonkin {|8^)>
On Sat, 18 Jan 2003, Stas Bekman wrote:
> Nick Tonkin wrote:
> > Well, I'm taking the plunge.
> >
> > I have a brand new spiffy machine I'm configuring and I've decided, since
> > for once I don't have to get it up and running urgently, to
eally need it.
But then under 'Configuring and Installing Prerequisites' it gives an an
example:
% ./Configure -des -Dusethreads
I'm confused. Where's the quick answer to whether or not I should use
threads? I'm on FreeBSD 4.7.
Thanks,
- nick
Nick Tonkin {|8^)>
gt; One more question. I redirect the incoming request by calling
> $r->uri($new_uri) in my PerlTransHandler. How can I make the browser
> show this new location in its address bar?
>
> Let me know if you need to know more about any aspect of my
> implementation. And, thanks for your help.
>
> -vish
>
>
- nick
Nick Tonkin {|8^)>
erver before the table is
updated.
In practise this wasn't a problem for us. far more imprtant is that the
'sticky' feature work consistently, so that -- barring a server dying --
clicks-through go to where the impression data are stored (or whatever :)
- nick
Nick Tonkin {|8^)>
ired, using the adaptive balancing, with no real
problems, before moving to the Foundry Systems hardware.
- nick
Nick Tonkin {|8^)>
f you mean that the httpd hangs around for a long time waiting
for the other processes to end, and thus your web server gets bogged down,
than you should look at setting up a thin front-end apache with the
mod_perl server behind. That's the subject of a good deal of info in the
mod_perl Guide and in the archives of this list.
- nick
Nick Tonkin {|8^)>
s/was the lead developer) were very responsive and
worked with us to tweak as necessary.
After a while we got one of those loser "CFOs" who was golf pals with the
new "COO" or something, and he bought a bunch of Foundry Systems Server
Irons that worked alright but were
you can
easily have
http://your.server.com/path/to/resource/special
http://your.server.com/path/to/resource
or something similar, and have a handler that handles everything in that
path, returning DECLINED if it doesn't match the URI you are looking for
(you don't need two handlers for this).
Hope this helps,
- nick
t.
I would try unintsalling and then reinstalling CGI.pm via CPAN.
- nick
Nick Tonkin {|8^)>
> Thanks-
> Rodney
>
> On Wed, 18 Dec 2002 16:13:19 +0800 Stas Bekman <[EMAIL PROTECTED]> wrote:
>
> > [EMAIL PROTECTED] wrote:
> > > I a
One thing that's useful for both people who don't know where else to turn
and people who don't want anything that's not pure mod_perl is simply to
preface your subject line with [OT] ... it's then very simple to filter
out unwanted messages in any mail reader.
- nick
P
or content suggestions. Stacked handlers, among other things
... I think it just goes to show that there can be no successful trivial
coverage of mod_perl. (That's why the Eagle book, and the mpDC, are so
good.)
- nick
Nick Tonkin {|8^)>
to mod_perl or to your readers by
glossing over how large a field of study mod_perl is. It's almost as bad
as the "Teach Yourself Perl in 24 Hours" title put out by Geoff's
publisher.
I urge you to rethink this plan.
- nick
Nick Tonkin {|8^)>
On
sidering we're
talking about IE) and then returning to it via the bookmark?
...Nick.
--
Nick Challoner
[EMAIL PROTECTED]
Not a mod_perl issue; in your apache conf do this:
# I keep all images and javascripts etc under /_[something]
SetEnvIf Request_URI "/_" dontlog
CustomLog /home/nick/logs/httpdlog common env=!dontlog
- nick
~~~~
Nick Tonkin {|8^)>
On Tue, 19 Nov 2002, Cure
I would like to log the time it take users to download
items from my site. Has anyone has any success
writing a mod perl prog to accomplish this?
Thanks!
__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.c
n existing site that shows some of the art these kids make (and also
why we need a new one!) can be viewed at http://www.rain.org/~artworks/
A cool project by one of the students is at
http://www.rain.org/%7Eartworks/NewATW/students/norma_web/norma_intro.html
Thanks folks,
- nick
~~~
with a logging daemon on the server and
clients on the clients. The latter took logging data from apache with a
custom handler and then sent it off to the daemon using some of the
techniques I mentioned above.
- nick
Nick Tonkin {|8^)>
- nick
Nick Tonkin {|8^)>
On Tue, 27 Aug 2002, Per Einar Ellefsen wrote:
> - I originally had Apache::Auth::Authen, ::Authz and ::Access, but Robin
> Berjon told me he preferred to have the 4 as top-level namespaces. What do
> people think?
I'm
The content seems great. But whatever font you've used is rendering skinny
and pixelated and hard to read and makes me want to egt of the site
asap ... why not leave font face undetermined so the font that each has
chosen for his platform is employed?
- nick
~~~~
I'm confused. Since when did bloat surpass elegance as a measure of
success in Perl programming?
- nick
~~~~
Nick Tonkin {|8^)>
On Thu, 4 Jul 2002 [EMAIL PROTECTED] wrote:
> On Wed, Jul 03, 2002 at 02:41:38PM +0100, Peter Haworth wrote:
> > On Wed, 3
== NULL )
> XSRETURN_UNDEF;
>+PerlIOBase((PerlIO*)RETVAL)->flags &= ~PERLIO_F_CANWRITE;
>
> OUTPUT:
> RETVAL
Import attempts to find out how FD that FILE * is using is open
but that really isn't sufficient.
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/
dio && PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
> return PerlSIO_fflush(stdio);
> }
> else {
>End of Patch.
>
>
>NI-S will probably find this patch very wrong :-)
Should be harmless. A :stdio layer without a FILE * "should never happen".
Your patch prevents it doing fflush(NULL) if it does.
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/
> >> mode=0xb828 "w") at util.c:2080
>
> doug> looks like something along the lines of:
> doug> open my $foo, '|-' or ...;
>
>This is indeed done by Mail::Mailer.
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/
conundrum vis a vis PerlTransHandler, but
it's a more elegant solution anyway, imho.
- nick
~~~~
Nick Tonkin {|8^)>
On Wed, 12 Jun 2002, Rasoul Hajikhani wrote:
> A funny thing is happening with my PerlTransHandler...
> It is not being called at all... :(
>
this and I'm
getting edgy!
best regards
Nick Barton
http://www.websavant.co.uk
> I always make my front end reverse proxy handle static content
> directly.
Always is a strong word! At ValueClick we used thttpd servers to deliver
gif images ... one thttpd could efficiently handle the same number of
requests as several (non-mod_perl) front end reverse proxies ...
- nick
Nick Tonkin {|8^)>
y its
library paths.
The best solution I've found is to create a new user 'perl' and install
Perl and all libraries etc under that user's home directory.
My system:
nick@world ~>uname -a
FreeBSD world.tonkinresolutions.com 4.4-PRERELEASE FreeBSD 4.4-PRERELEASE
#1: Sat Aug 11
... and a _lot_ cheaper than LocalDirector and others (although we did
move to a high-end Foundry Server Iron system eventually) ... good support
from a small company too.
- nick
~~~~
Nick Tonkin {|8^)>
On Fri, 14 Dec 2001, Perrin Harkins wrote:
> > I am planning to
se to only send mail to addresses at the attacking host's SOA, for
example, and can choose whether or not to send mail for every attack or
just once per cache-period.
Also available and full documentation at
http://www.tonkinresolutions.com/software/perl/Apache/MSIISProbes/
Enjoy
Well, ask Ask if you want the whole truth. But when I saked him that's
what he said. Maybe there's a problem with the architecture and some
pre-indexing is done per session or something suboptimal like that. Ask?
~~~
Nick Tonkin
On Tue, 27 Nov 2001, Robert Landrum wrot
Because it does a full text search of all the contents of the DB.
~~~
Nick Tonkin
On Tue, 27 Nov 2001, Robert Landrum wrote:
> Does anyone know why search.cpan.org is always the s-l-o-w-e-s-t site
> on the internet? I can't believe it always busy. I've had trouble
=> 'auth', # whatever you've called it
path=> '/',
value => ''
);
$cookie->bake;
return $cookie;
}
sub logout_screen {
[ ... ]
}
1;
~~~
Nick Tonkin
On Tue, 27 Nov 2001, Jon Robison wrote:
> I ha
etc.)
> A corrected version of your sample script follows. It's much simpler now...
So simple it only does half of what it did :)
?
- nick
ny code you like, including the other example posted here. Just remember
to test whether you already have the window open or not and act
appropriately.
~~~
Nick Tonkin
On Tue, 20 Nov 2001, Ben Demonte wrote:
> How to create a browser popup windowhow do I unsubscribe from this list.
&g
Speaking of the risks of using cookies for auth* stuff:
http://dailynews.yahoo.com/h/cn/2009/tc/microsoft_apologizes_in_security_flap_1.html
~~~
Nick Tonkin
1 - 100 of 164 matches
Mail list logo