Welcome Guest, Not a member yet? Register   Sign In
How to have a session that never expires ?
#11

(06-13-2018, 08:14 AM)dave friend Wrote:
(06-13-2018, 07:52 AM)Coool6 Wrote: I tried your solution but always the same issue, after a short time the session expires...
I don't get it  Sad Sad Sad

When you say "the session expires" you mean that the session data is gone?

I have a GitHub Repository that is designed to test CodeIgniter (v3.x.x) session configuration. It contains one controller and one view file. Give it a try it may help you determine if you have a config issue or some other "logic" problem.

When i say the session expires, i mean when the user logins, the script does that : 


PHP Code:
$this->session->set_userdata('user_id'$result['id']); 

then that to check if the logged session is still running : 

PHP Code:
if(!empty($this->session->user_id)):
echo 
"LOGGED";
endif; 

Very classic i guess, no ?

So for my test, i just login, let the tab opened and comeback X hours after, reload the page to see if i'm still logged or not. When it's 30 mins after, i'm still logged, but when it's after X hours, i'm not !

Thanks for the github, i will take a look and give it a try !
Reply


Messages In This Thread
RE: How to have a session that never expires ? - by Coool6 - 06-13-2018, 08:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB