in reply to Re: LWP ignoring cookies??
in thread LWP ignoring cookies??

Nope, still the same. Even trying the script on Win32 (Activestate Perl) does the same.

Replies are listed 'Best First'.
Re^3: LWP ignoring cookies??
by Massyn (Hermit) on Jan 05, 2008 at 07:56 UTC
    Ok, this worked...
    my $ua = LWP::UserAgent->new( cookie_jar =>HTTP::Cookies->new( file => + '/tmp/cookies.txt', autosave => 1, ignore_discard => 1 ));
    and then I had to make sure that /tmp/cookies.txt exists, and that it's accessable. Silly though - I would have expected the in-memory cookie jar to operate...
      use LWP; my $ua = LWP::UserAgent->new; $ua->cookie_jar({}); my $response = $ua->get('http://www.google.com/'); use Data::Dumper; print Dumper($ua);
      Proof of concept that it works fine with {} as the cookie jar.
      in memory should work, do you have latest LWP?
        Hi all - thanks for all your help. I've determined that the problem I'm experiencing may actually reside within Wordpress, and the way it determines if cookies are enabled or not. My own PHP code that sets and retrieves a cookie works fine when called from LWP, so I'm happy that LWP is not at fault.. ;-) Now to debug Wordpress.... Oi.......