Re: [mp2] A better way to set the Expire header

2005-06-22 Thread Foo Ji-Haw
Hello Perrin, Thanks for the tip. I am just surprised that setting dynamic pages to expire immdiately is not a common line in the code for developers. Don't we want them (pages) to expire immediately, instead of worrying whether the browser will cache the page? Or am I missing something here?

Re: [mp2] A better way to set the Expire header

2005-06-22 Thread Perrin Harkins
On Thu, 2005-06-23 at 12:16 +0800, Foo Ji-Haw wrote: > $r->headers_out->add('Expires'=>CGI::Util::expires('now','http')); > > Notice that I have to 'use CGI::Util' to set this to work. CGI::Util > does not expose the function, but it seems to work quite well. > > I am sure there is a better way

[mp2] A better way to set the Expire header

2005-06-22 Thread Foo Ji-Haw
Hello guys, For the newbies out there, this is one way (though arguably unorthodox) to set the Expire header on your page: $r->headers_out->add('Expires'=>CGI::Util::expires('now','http')); Notice that I have to 'use CGI::Util' to set this to work. CGI::Util does not expose the function, but

Re: what is the equivalent for CGI->redirect()?

2005-06-22 Thread Philippe M. Chiasson
Foo Ji-Haw wrote: > Hi guys, > > I used to use CGI->redirect, but what is the requivalent for modperl2? Set the 'Location:' header and return a REDIRECT return code use Apache2::Const -compile => qw(REDIRECT); # Same as HTTP_MOVED_TEMPORARILY my $location = "http://www.google.com/";; sub handle

Re: mod_perl configuration trouble

2005-06-22 Thread Jan Eden
Jan Eden wrote on 22.06.2005: >Geoffrey Young wrote on 22.06.2005: > >> >>>..[Wed Jun 22 17:20:49 2005] [error] Insecure directory in >>>$ENV{PATH} while >>running with -T switch >> >>clean up your path and you should be ok - this is keeping >>Apache::Test* from loading properly. in other words,

Re: mod_perl configuration trouble

2005-06-22 Thread Geoffrey Young
> But this does not solve my real problem, i.e. that the modules are not > found when running my scripts. > > [Wed Jun 22 18:04:12 2005] [error] Can't locate Apache/RequestRec.pm you initially said you were using mod_perl 2.0.1. if that's true it's Apache2::RequestRec you're after, not Apache::

Re: Basic Authentication & logout

2005-06-22 Thread Simon Perreault
On Wednesday 22 June 2005 13:32, Adam Prime x443 wrote: > Ideally, you expire the session on the server (ie, in the DB), rather than > by removing the cookie. > > Common hacks people use to remove cookies are setting the expiry in the > past, or to +1s, or simply to put invalid content into the coo

RE: Basic Authentication & logout

2005-06-22 Thread Adam Prime x443
Ideally, you expire the session on the server (ie, in the DB), rather than by removing the cookie. Common hacks people use to remove cookies are setting the expiry in the past, or to +1s, or simply to put invalid content into the cookie, which your auth mechanism will subsequently disregard.

Re: Basic Authentication & logout

2005-06-22 Thread Simon Perreault
On Wednesday 22 June 2005 11:15, Andrea Palmeri wrote: > My question is: how do I logout users which have been authenticated ? > (responding to an html link) This is basically impossible. People telling you otherwise are assuming that one browser's quirks are standard.

Re: mod_perl configuration trouble

2005-06-22 Thread Jan Eden
Geoffrey Young wrote on 22.06.2005: > >> ..[Wed Jun 22 17:20:49 2005] [error] Insecure directory in $ENV{PATH} while >running with -T switch > >clean up your path and you should be ok - this is keeping Apache::Test* >from loading properly. in other words, it's not that it can't find the >module

Re: mod_perl configuration trouble

2005-06-22 Thread Geoffrey Young
> ..[Wed Jun 22 17:20:49 2005] [error] Insecure directory in $ENV{PATH} while > running with -T switch clean up your path and you should be ok - this is keeping Apache::Test* from loading properly. in other words, it's not that it can't find the modules it needs, they just can't load because s

Re: [mp2] PerlSetEnv Issue

2005-06-22 Thread Geoffrey Young
Brian Becker wrote: > I'm sorry to say this did not fix the problem - bit I have managed to > hack up some of the code to get it to unset the environment. I really > didn't know what I was doing so there is probably a better way (and I > don't really know the internals of mod_perl so I may have sc

Re: mod_perl configuration trouble

2005-06-22 Thread Jan Eden
Joe Cullin wrote on 22.06.2005: >Also, PerlHandler was replaced with PerlResponseHandler in 2.0. > >PerlResponseHandler ModPerl::Registry > >It's kind of tough learning mod_perl right now, because all the >books give 1.0 examples, and 2.0 seems to have a lot of small >differences. The docs at per

RE: [mp2] PerlSetEnv Issue

2005-06-22 Thread Brian Becker
I'm sorry to say this did not fix the problem - bit I have managed to hack up some of the code to get it to unset the environment. I really didn't know what I was doing so there is probably a better way (and I don't really know the internals of mod_perl so I may have screwed other things up)...but

Re: mod_perl configuration trouble

2005-06-22 Thread Joe Cullin
Also, PerlHandler was replaced with PerlResponseHandler in 2.0. PerlResponseHandler ModPerl::Registry It's kind of tough learning mod_perl right now, because all the books give 1.0 examples, and 2.0 seems to have a lot of small differences. The docs at perl.apache.org are a good reference. H

Re: mod_perl configuration trouble

2005-06-22 Thread Jan Eden
Geoffrey Young wrote on 22.06.2005: >Jan Eden wrote: >>Hi, >> >>I recently installed mod_perl 2.0.1 as a DSO to Apache 2.0.53 (on >>OS X 10.3.9). The simple example from the docs works: >> >>Can't locate loadable object for module Apache::Constants in @INC >>Can't load Perl module Apache::Registry

Re: Basic Authentication & logout

2005-06-22 Thread Chris Croome
Hi On Wed 22-Jun-2005 at 05:15:58PM +0200, Andrea Palmeri wrote: > > My question is: how do I logout users which have been > authenticated ? (responding to an html link) This way of doing it more-or-less works (Opera seems to have problems...): https://wiki.slugbug.org.uk/HTTP_Authentication

Re: mod_perl configuration trouble

2005-06-22 Thread Geoffrey Young
Jan Eden wrote: > Hi, > > I recently installed mod_perl 2.0.1 as a DSO to Apache 2.0.53 (on OS > X 10.3.9). The simple example from the docs works: > > Can't locate loadable object for module Apache::Constants in @INC > Can't load Perl module Apache::Registry for server 127.0.0.1:0, > exiting...

Basic Authentication & logout

2005-06-22 Thread Andrea Palmeri
Hy everybody, I'm using Apache to and mod_perl to develop a reverse proxy which authenticates users before forwarding requests to the backend servers.    My question is: how do I logout users which have been authenticated ? (responding to an html link)   I know that using    $r-> note_basic

mod_perl configuration trouble

2005-06-22 Thread Jan Eden
Hi, I recently installed mod_perl 2.0.1 as a DSO to Apache 2.0.53 (on OS X 10.3.9). The simple example from the docs works: Alias /perl/ /home/httpd/httpd-2.0/perl/ SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI

Re: seg faults on RHEL 3

2005-06-22 Thread Brian Duggan
On Wednesday, June 22, Joel Bernstein wrote: > Try seeing if you can remove unicode from the equation. RH Perl often > has odd utf-8 settings. Build a non-utf8 perl and link mod_perl with > that? > > Also, it may be as simple as removing .utf8 from $LANG. A lot of RH > boxes I've seen set LANG=en

seg faults on RHEL 3

2005-06-22 Thread Brian Duggan
Hi Modperlers, I saw some recent posts with problems like this, but I didn't see a solution. I'm migrating a large mod_perl application from a machine with redhat 7.3, apache-1.3.27, mod_perl-1.27, and perl 5.6.1 to a machine with Redhat Enterprise Linux AS 3, mod_perl-1.29, apache-1.33, and perl

Re: cannot set a cookie with an empty string

2005-06-22 Thread Markus Wichitill
Foo Ji-Haw wrote: Will like to confirm if it is not possible (or legal) to set a cookie with an empty value (''). I tried it, and the page failed Setting an empty value is what you have to do to delete a cookie. BTW, please don't start new threads as replies to completely unrelated threads. A

what is the equivalent for CGI->redirect()?

2005-06-22 Thread Foo Ji-Haw
Hi guys, I used to use CGI->redirect, but what is the requivalent for modperl2? thanks.

cannot set a cookie with an empty string

2005-06-22 Thread Foo Ji-Haw
Hi all, Will like to confirm if it is not possible (or legal) to set a cookie with an empty value (''). I tried it, and the page failed