I am experiences a weird problem in a CakePHP application. It only
seems to happen on specific version of IE8, and I have been unable to
reproduce the problem myself, but the user has been helpful and
reproduced it for me several times, so that I could collect some
debugging information. The user agent is:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0;
GTB6.6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729)
The problem arises on a specific method in a controller, which simply
reads a session variable twice and tests the read out value, here is a
simplification of the code:
function faulty_method($id = null)
{
        if($this->Session->read('type') == 1)
        {
                // Do stuff1
        }
        else if($this->Session->read('type') == 2)
        {
                // Do stuff2
        }
        else
        {
                $this->flash('No access', '/site');
        }
}

For this particular user, he always get a new session when entering
this method, thus the session variable is not available and the test
fails. In the debug information I can clearly see that the session ID
changes between the previous page and this faulty site. Here is a
snippet of the cookies available on the previous site and the cookies
on the faulty site:
Array
(
    [__utma] => ...
    [CAKEPHP] => cf6aaa77438e8025e0ea26a91f54b5a1
)
Array
(
    [CAKEPHP] => 79f1b7fe5c795aa7c295dec6b584e955
    [__utma] => ...
)
On any browser I have tested with (including IE8, both with and
without compatibility mode) I keep the same session ID during the
whole session. And I have tried to use the most restricted security
setup of IE. Session.checkAgent is set to false. Furthermore I have
updated to 1.3 and is using the new cake_session.php from
http://cakephp.lighthouseapp.com/projects/42648/tickets/332-session_write_close-in-sessionphp-problem-multiple-set-cookie
which lead to the user only occasionally loses his session.

Currently I see no other way, but to use URL sessions, but I hope
someone can point me in the right direction, and fix this problem so I
can use normal cookie sessions.

Thanks in advance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to