Session doesn't save the data |
[eluser]Thibaut Rey[/eluser]
Hello, Another problem for my website. I try now to use the sessions. I use also the database to save the session. So in the database for one page i read at the browser i have one line that appears in the ci_session table is it normal ? Moreover i think that the system doesn't save my data. Let me show you the code : Code: $this->session->set_userdata('id', $this->connexion->user_id($email)); If i print the value of the session on the same controller i don't have problem. But if i try to print the value on another controller the value doesn't exist (i think because the system create another line of session on the database) This is an extract of my config.php file : Code: $config['sess_cookie_name'] = 'ci_session'; I'm a new developer and it's possible that i don't have understand something about session. Can you help me please.
[eluser]cideveloper[/eluser]
What is the size of your user_agent field in the ci_session table? Increase it to 100. Also change user_data to MEDIUMTEXT.
[eluser]osci[/eluser]
[quote author="Hello" date="1309435688"]Load the session library in config file[/quote] As of v2.0.2 you don't load the session class User Guide - Upgrading 2.0.1 to 2.0.2
[eluser]Thibaut Rey[/eluser]
I use now DB session and it done. But i'm very bored that the codeIgniter sessions have problem.
[eluser]osci[/eluser]
When you are talking about db session you mean you have enabled sess_use_database? This is ci session. About my comment on upgrade sorry, it was about the security not session, so wrong post. I noticed that there is a check for ip. I don't know if it works nice if you are behind a proxy. Also ie doesn't like very much underscores in cookie names.
[eluser]Thibaut Rey[/eluser]
I have a mac and so i use safari and firefox. I say that i use now this : http://codeigniter.com/wiki/DB_Session/ I think the codeigniter session system isn't stable. But DB session is stable and done very well.
[eluser]InsiteFX[/eluser]
Oh really! I have no problems using CI Sessions. InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |