Re: Bug or strange behavior with CURLOPT_COOKIE: cookie value disappears
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.
> 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
>> 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:
> 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.
> Yeah, I get a buck. So?
Received on 2008-03-28