Session Fix |
[eluser]EyeAmN8[/eluser]
Since there is a lot of open ended posts about CI sessions not working I figured I would share this. I was having problems using sessions and it was giving me a hard time. All it ended up being was the config.php was not setup properly. My base url and cookie domain did not match! My base url was http://website.com and my cookie domain was www.website.com FYI - website.com is not my site, just an example Incase you are new to CI like me check your config file to make sure that the two fields match CodeIgniter v 2.1.3, with pretty much all of the default configs application -config -config.php line 17 Code: $config['base_url'] = 'http://website.com'; Code: $config['cookie_prefix'] = ""; This doesn't cover all the details, but just the "basic" configuration that I missed! |
Messages In This Thread |
Session Fix - by El Forum - 02-08-2013, 04:46 PM
|