|
Posted by "Kristen G. Thorson" on 11/22/05 16:27
n.g. wrote:
>save below as testcookie.php, request it from your browser twice, what
>do you get at 2nd time?
> <?php
> setcookie('sessioncookie', 1);
> setcookie('storedcookie',1,time()+3600);
>
> var_dump($_COOKIE);
> ?>
>
>On 11/22/05, Kristen G. Thorson <kthorson@allegroconsultants.com> wrote:
>
>
>>Anyone have any suggestions? I'm still stuck.
>>
>>
>>thanks,
>>kgt
>>
>>
>>
>>Kristen G. Thorson wrote:
>>
>>
>>
>>>I'm having problems with a customer who can't login to a wholesaler
>>>application. To ensure the problem was that the cookie was not being
>>>set, I sent him to this script:
>>>
>>>if( !isset( $_REQUEST['page'] ) ) {
>>> setcookie('VATtest','Cookie has been set.',time()+50000, "/");
>>> echo '<a href="'.$_SERVER['PHP_SELF'].'?page=1">Test cookie.</a>';
>>>} else if( $_REQUEST['page'] == '1' ) {
>>> if( isset( $_COOKIE['VATtest'] ) ) {
>>> echo $_COOKIE['VATtest'];
>>> } else {
>>> echo 'Cookie NOT set.';
>>> }
>>>}
>>>?>
>>>
>>>
>>>He got "Cookie NOT set." which means exactly what it says. He's using
>>>IE 6.0, and swears up and down that he's set it to always allow
>>>cookies from this domain. I can't verify that he's set it correctly,
>>>but he has been told twice how to do it. I also know his browser must
>>>be saving some cookies, as he is able to login to other sites. Has
>>>anyone run into other sources of cookie-blockage in the past? I
>>>cannot manage to duplicate this when I have IE set to always allow
>>>cookies from this domain.
>>>
>>>Thanks for any tips,
>>>
>>>kgt
>>>
>>>
>>>
>
>
Request from MY browser? I get
array(2) { ["sessioncookie"]=> string(1) "1" ["storedcookie"]=>
string(1) "1" }
This isn't a problem in my browser, however. I don't want to keep
sending this customer to random scripts, so can you explain the point of
this script? I mean, in what way might this help me figure out why his
browser is not setting a cookie?
thanks,
kgt
[Back to original message]
|