Welcome Guest, Not a member yet? Register   Sign In
session in 3.0.3 not saving userdata
#6

(This post was last modified: 11-28-2015, 03:09 PM by Narf. Edit Reason: Fix a typo )

(11-28-2015, 11:01 AM)zuboje Wrote:
(11-28-2015, 05:14 AM)Narf Wrote:
(11-27-2015, 11:07 PM)zuboje Wrote: I've solved this problem. Problem was that my cookie was overriding database session. In config file if using database for session, this line cannot have value:

$config['sess_cookie_name'] = 'mydomain';

In order for session to work using database, that value has to be empty:

$config['sess_cookie_name'] = '';

If it is not empty, CI will default to cookies for your session. This does not mean you cannot use cookies. You just have to loaded them via helper and they will work just fine.

Not true.

It is 100% sure since that resolved my problem.

No, it's not.

The only thing you know is that setting $config['sess_cookie_name'] to an empty string somehow made your application work. Everything else you just made up, and what you've made up doesn't even make sense.

Your problem is a simple cookie name collision; setting $config['sess_cookie_name'] to anything but the name you've used with CI2 would resolve your problem. Setting it to an empty string just makes it use the session.name value from your php.ini.
Reply


Messages In This Thread
session in 3.0.3 not saving userdata - by zuboje - 11-27-2015, 03:57 PM
RE: session in 3.0.3 not saving userdata - by Narf - 11-28-2015, 03:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB