I'm posting this as I had a problem that was driving me nuts. I know IE7 is ancient, so there are some posts on this subject from 2008/9, but none solved it for me. I have a global banking client trying my software and their standard browser is IE6. That is not at all uncommon in large corporates; upgrading a browser version is a big task and when you have hundreds or thousands of web apps that 'work' in IE6 retesting them is a major project. Microsoft even have a special IE6 support arrangement with them.
-- IE6 was proving a step too far for anything approaching a modern web site (that - as you'd expect - works perfectly in modern browsers) so they have agreed to limit it to users with IE7, which had some residual problems that also occurred in IE6.
Anyhow, that's the background, here's the problem and the solution. I just hope it helps at least one other person with this issue.
I'm using CakePHP version 2.3.9, but I suspect this would work in previous 2.x versions too.
The problem
Users can log in with any browser but not IE6/7. Even if the right credentials work (and you know by using debug statements that the user is being logged in) they are constantly returned to the login screen as not logged in. Tracking it back, it's all good until the user is redirected, when for some reason the session fails, losing the logged in state. For the record, I am using database sessions - not sure how relevant this is to other session variants.
The solution
Add these lines to core.php:
Configure::write(
'Session',
array(
'defaults' => 'database',
'cookie' => '[something]',
'cookieTimeout' => 0,
'checkAgent' => false,
'ini' => array (
'session.cookie_secure' => false,
'session.referer_check' => false
)
)
);
Note that you need to add something relevant as the cookie name. I'd recommend avoiding underscores and special characters as there are other IE issues related to domain names that contain underscores and - even if they have nothing to do with this issues - I prefer to avoid them.
You cannot imagine my joy when I was able to log in after applying this fix.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment