IE8 session/cookie problem - SOLVED |
[eluser]hyperfire[/eluser]
It's a crying shame. Frustrated here on IE8 session issues. Will I have to change my code to use native sessions? This sucks! Also, none of the wiki session libraries is working anymore, that place has gone completely outdated. It would be nice to have a wrapper for CI to use native sessions by just 'extending' the native session class, but there's none available.
[eluser]InsiteFX[/eluser]
1) IE does not like an underscore char _ it converts it to something else and will always cause your sessions to fail! 2) You have to go into IE tools on the menu and change the cookie settings, to allow session cookies.
[eluser]ivantcholakov[/eluser]
@hyperfire A year ago I switched to CI 3, the developers' version, it has a driver for native PHP sessions. Before that, I used this library, it worked well for me: https://github.com/EllisLab/CodeIgniter/...sion-Class Here is a link to the original post: http://www.philsbury.co.uk/index.php/blo...-revisited With this library I wanted to use named PHP sessions, so I replaced in two places this Code: session_start(); with Code: session_name((string) config_item('sess_cookie_name')); You may give it a try, but in case of problems I would not be able to help, because I don't use this library anymore.
[eluser]CroNiX[/eluser]
[quote author="InsiteFX" date="1375871527"]2) You have to go into IE tools on the menu and change the cookie settings, to allow session cookies. [/quote] That's great for developers, but you can't expect the public to do that in order to visit your site. Sessions should work with regular cookies enabled and no extra special settings.
[eluser]hyperfire[/eluser]
[quote author="InsiteFX" date="1375871527"]1) IE does not like an underscore char _ it converts it to something else and will always cause your sessions to fail! 2) You have to go into IE tools on the menu and change the cookie settings, to allow session cookies. [/quote] 1) I'm aware of the underline error but my cookie name have nothing but 4 letters as it's name. 2) To recommend a developer to change a browser setting in order for some code to work, is just the wrong thing to say, please stop. Some of us deploy real world applications where this kind of procedure is just not an option at all. -------------------------- I have to debug a little more, but I believe my problem to be my cookie name: Code: $config['cookie_domain'] = ".mydomain.com"; I need this cookie to be available for the main domain and for the subdomains as well, so I did as CI told me. Code: | 'cookie_domain' = Set to .your-domain.com for site-wide cookies I have to try ivantcholakov library yet. Any other option guys? I have tested the "native-library" "OB session" and some other obscure code like adding header parameters on every controller and things like these.
[eluser]InsiteFX[/eluser]
It is not the wrong thing to say because IE ships with the allow session cookies turned off. Plus depending on who setup the system for the customer they may have also set the security to high. Plus FYI I have been using All browsers and IE since version 6 and have never had a cookie problem. Microsoft IE doe's not follow the RFC cookie rules that all the other browsers follow. PHP Net set cookie |
Welcome Guest, Not a member yet? Register Sign In |