Re: reset multiple cookies

2006-12-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, Dec 09, 2006 at 02:18:09AM +0100, Marc Lambrichs wrote: > I'm trying to reset multiple cookies. However, only the last one of the > @cookies array is reset. How come? > [...] >foreach my $cookie ( @cookies ){ >$log->debug(

[mp1] Apache::ExtUtils determines incorrect linker

2006-12-09 Thread Ray Link
All, When building mod_perl 1.29 on Solaris 9 via apxs, the apaci/perl_config script returns the value 'cc' as the linker because Apache::ExtUtils calls basename on the value contained in $Config{ld}, which in my case is /usr/local/opt/SUNWspro/bin/cc. Truncating this to just 'cc' results in f

reset multiple cookies

2006-12-09 Thread Marc Lambrichs
I'm trying to reset multiple cookies. However, only the last one of the @cookies array is reset. How come? foreach ( @domains ){ push @cookies, APR::Request::Cookie->new( $r->pool, name => 'ticket',

Re: Fixing a mod_perl module

2006-12-09 Thread Clinton Gormley
> When I change: > > return Apache2::Const::REDIRECT; > > to: > > return Apache2::Const::HTTP_MOVED_PERMANENTLY; > > I get: > > Bareword "Apache2::Const::HTTP_MOVED_PERMANENTLY" not allowed while > "strict subs" in use You need something like: use Apache2::Const -compile => qw(OK DECLINED HTT

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Philip M. Gollucci
cfaust-dougot wrote: I have read that and I used to use the 2nd method on that page without any problems.. Because I'm trying to do away with CGI.pm I'm now using the 3rd method "using libapreq2' but without the content type etc when its a redirect. Because there isn't a redirect example usin

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread John ORourke
cfaust-dougot wrote: I'm always passing a relitive path to "Location" so I didn't think it would matter.. Sure enough once I simply added 'Path => '/'," to all my cookie create statements, SUCCESS!!! Yay! Has to be said I only thought of the hostname because I do the path out of habit! By th

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
The path was it I'm always passing a relitive path to "Location" so I didn't think it would matter.. Sure enough once I simply added 'Path => '/'," to all my cookie create statements, SUCCESS!!! I'm now 100% without CGI.pm in my scripts, WooHoo!!! Thanks John, Clinton and Philip, you gu

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread John ORourke
Ummm... this should be obvious but are you redirecting to a different hostname? In your code you're not explicitly setting the cookie domain or path, so the browser will only send the cookie to pages with the same hostname. That would explain why you don't see it on the redirect... Note tha

Re: Fixing a mod_perl module

2006-12-09 Thread Grant
> Hello, I'm on the Interchange mailing list (icdevgroup.org) and we've > found a problem with our Interchange::Link mod_perl module for > apache2. I don't know perl myself, and I was wondering if anyone here > might be able to help fix it. > > The problem is that the Interchange tag: > > [bounce

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
I have read that and I used to use the 2nd method on that page without any problems.. Because I'm trying to do away with CGI.pm I'm now using the 3rd method "using libapreq2' but without the content type etc when its a redirect. Because there isn't a redirect example using libapreq2, does that

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
Does the order matter? I'm doing this $r->err_headers_out->add( 'Set-Cookie', $cookie->as_string ); $r->headers_out->set( Location => 'http://domain.com/page'); return Apache2::Const::REDIRECT; I'm guess i

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Clinton Gormley
> See these FAQs: > http://perl.apache.org/docs/2.0/user/coding/cooking.html Thanks for that Philip - just seen the issue I had in my live code... And Chris, ignore what I said about add() and set() - I was confused. > >

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Philip M. Gollucci
cfaust-dougot wrote: Thanks Clinton,John and Philip.. Everything is helpful. Can I ask if there is something different when redirecting? It would appear the cookie isn't being sent in a redirect. When logging in from the post form I see the "Set-Cookie" header being set but when I redirect

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Clinton Gormley
> > Can I ask if there is something different when redirecting? It would > appear the cookie isn't being sent in a redirect. It should be fine setting cookies in a redirect as long as 1) you're using $r->err_headers_out->add() 2) you're not doing an internal redirect so, for instance, this se

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
Thanks Clinton,John and Philip.. Everything is helpful. Can I ask if there is something different when redirecting? It would appear the cookie isn't being sent in a redirect. When logging in from the post form I see the "Set-Cookie" header being set but when I redirect them back to the URl th

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Philip M. Gollucci
cfaust-dougot wrote: I can both see the cookie being sent in the browser, and I can view the cookie itself on the filesystem after its been created... After the cookie has been set... my $req = APR::Request::Apache2->handle( $r ); my $jar = $req->jar; print $req->jar_status(); See this test

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Clinton Gormley
> After the cookie has been set... > > my $req = APR::Request::Apache2->handle( $r ); > my $jar = $req->jar; > print $req->jar_status(); > > Just gives me the error of "Missing Input Data" and I'm sure apreq2 is > loaded. from what John said: > jar() returns undef if the browser sent no Cook

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
I can both see the cookie being sent in the browser, and I can view the cookie itself on the filesystem after its been created... After the cookie has been set... my $req = APR::Request::Apache2->handle( $r ); my $jar = $req->jar; print $req->jar_status(); Just gives me the error of "Missing

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread John ORourke
cfaust-dougot wrote: I've tried both Apache2::Cookie and APR::Request::Cookie (from the posts I read I got the impression it was better to use ARP::Request::Cookie then Apache2::Cookie). Definitely. You also need to read the man pages, but I've saved you the trouble... $r->err_headers_out->

Re: ModPerl 2.03 for Windows

2006-12-09 Thread Randy Kobes
On Sat, 9 Dec 2006, Octavian Rasnita wrote: Ok, thank you. I have finally installed it. I have also tried to install it using the ppm command line, but ppm4 is not very nice anymore. I have tried: ppm s mod_perl Only one package was found, and this is strange. I have the TheoryX repository

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Clinton Gormley
On Sat, 2006-12-09 at 09:37 -0500, cfaust-dougot wrote: > Thanks for the reply Clinton, I was just using the same request obj > from the handler, guess that was wrong :) > > I tried your read example and now I don't get anything at all (even > though I can see the cookie on the machine) What do

RE: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
Thanks for the reply Clinton, I was just using the same request obj from the handler, guess that was wrong :) I tried your read example and now I don't get anything at all (even though I can see the cookie on the machine) my $req = APR::Request::Apache2->handle( $r ); my $jar

The PerlProcessConnectionHandler on mod_perl 2.0.2 + apache v2.2.3

2006-12-09 Thread LUKE
mod_perl 2.0.2 + apache v2.2.3 from http://www.devside.net/server/webdeveloper httpd.conf ThreadsPerChild 1920 I have a project must upload files to win2003 server. So i do the job by implement Protocol (Connection) Handlers in mod_perl.

Re: Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread Clinton Gormley
> > The man page then says to use APR::Request::Cookie I should: > my $jar = $r->jar; > my $cookie = $jar->get("ISMH_SESSION_ID"); What is $r in this case? It should be an APR::Request::Apache2 or (APR::Request::CGI I think) handle. So, where $r is an Apache2::RequestRec object: To set: -

Apache2::Cookie/APR::Request::Cookie

2006-12-09 Thread cfaust-dougot
I'm down to the last thing I need to handle without CGI.pm to get rid of it, cookies... But I'm having a problem.. I've tried both Apache2::Cookie and APR::Request::Cookie (from the posts I read I got the impression it was better to use ARP::Request::Cookie then Apache2::Cookie). The problem

Re: ModPerl 2.03 for Windows

2006-12-09 Thread Octavian Rasnita
Ok, thank you. I have finally installed it. I have also tried to install it using the ppm command line, but ppm4 is not very nice anymore. I have tried: ppm s mod_perl Only one package was found, and this is strange. I have the TheoryX repository added, and only there it should find at least