Welcome Guest, Not a member yet? Register   Sign In
Database session
#1

[eluser]Suhas nazir[/eluser]
Hello i am trying to use database session in my CI project..I just created a table and changed the config file and put the db_session libraryi in application/libraries and tried to autoload the class .Unfortunately it shows

An Error Was Encountered

Unable to load the requested class: db_session

What may be the reason ,I am using a version >1.5????
#2

[eluser]WanWizard[/eluser]
What version of CI? Where did you get this library (the current CI version includes a library called 'session', not 'db_session').
#3

[eluser]Suhas nazir[/eluser]
Can i use database session and cookie session both in one CI project is it possible???
#4

[eluser]WanWizard[/eluser]
Can you explain what you exactly mean by that?

Sessions are about two things. Maintaining session state (a link between the browser and the application) and storing session information.

To maintain state, every session solution uses a cookie. That cookie should be encrypted, and should only contain enough information to maintain the state (usually only the session ID, sometimes some extra security checks like IP or browser info). You store session information server side, to make sure it's save. The CI session library uses a database table for that, there are third party options available that use other types of storage.

You can use other cookies as well, just use the set_cookie() and get_cookie() methods. But these don't have anything to do with the session.
#5

[eluser]Suhas nazir[/eluser]
Hi

Can i use database session and normal session both in a single project that means

Can i set a variable $this->db_session->set_userdata('info','Some value');
and $this->session->set_userdata('id','1');


In a single Controller




Theme © iAndrew 2016 - Forum software by © MyBB