cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Bug or strange behavior with CURLOPT_COOKIE: cookie value disappears

From: <mikkel.t.kromann_at_get2net.dk>
Date: Fri, 28 Mar 2008 13:58:15 +0100 (CET)

No, this is a quite consistent problem with my SuSE 10.2 installation (my
PC). Changing the names of the cookies does not alter anything.

I think that I also mentioned that the example script works smoothly and
as expected on the PHP installation on my webhotel.

Cookies in general also work well on the problem SuSE machine. So it's not
an Apache problem.

thanks, Mikkel

> On Mon, March 24, 2008 7:49 am, Mikkel T. Kromann wrote:
>> When I try to use CURLOPT_COOKIE I'm not able to set the value of the
>> cookie to anything but empty (print_r($_COOKIE) shows only the cookie
>> name as key, while the value is empty).
>
> That seems pretty weird...
>
>> # This is the contents of target.php
>> <?php print_r($_COOKIE); ?>
>>
>> # This is the contents of wrapper.php
>> <?php
>> print "This is the $_COOKIE array output by target.php \r\n";
>> $ch = curl_init("http://10.0.0.4/cURLtest/target.php");
>> curl_setopt($ch, CURLOPT_COOKIE, "id=242; ");
>
> I have this vague notion that maybe you ought to have:
> $array('id'=>242);
> as the last arg...
>
> If so, and if curl/php are nuking everything after 'id' because it's
> not a valid PHP variable name, which would be a holdover behaviour
> from the bad ol' days of register_globals "ON", it would make sense of
> this from a Big Picture.
>
> This is mostly speculation...
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-03-28