session is being expired autometically |
Hello Guys,
One of my codeigniter Application is not working properly on the server but it's working on my localhost and also working on another VPS server. But not working on my cPanel hosting. I use wordpress and codeigniter mostly and this session issue is causing only with codeigniter not with wordpress. I'm using autoload to load session and all others. Let me know if you guys need any other information Thanks in advanced.
You should show your session and cookie config. Have you done an isolated session test?
example ur: http://www.domainname.com/temp/welcome/index
when I open it then refresh it.. if session is set then it will show Session working message. then remove the index from url and write about.. it will still show the session working message. but when I'm clicking on the about hyperlink bellow the message "session working" then session is gone. here below is the controller code: PHP Code: class Welcome extends CI_Controller { I have also attached the cofig folder please check and let me know.. How can I solve the issue.
Have you set your session save path.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
You also need to tell us what type of sessions you are using, file / database / etc;
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Hi,
Thank you so much for replies guys.. $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = NULL; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE; $config['cookie_prefix'] = ''; $config['cookie_domain'] = ''; $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; here is the session config and cokie config Thanks!!
(09-27-2017, 06:38 AM)tysonchamp Wrote: Hi, Read the in-file documentation above these settings in config.php.
(09-27-2017, 06:38 AM)tysonchamp Wrote: Hi, You need to set the save path to some thing like this example PHP Code: $config['sess_save_path'] = APPPATH . 'cache/sessions/'; Folder permission 0700
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |