0

I am using CI 3.1.9. At start everything was working fine but now my CI session gets destroyed automatically but this behavior is random. Sometimes it works fine but most of the time when i login it redirects me to the login page again due to session gets destroyed. I have searched it over stackoverflow.com the found a solution here Codeigniter session data lost after redirect. The solution worked perfect for me but I don't understand what difference does it make by replacing ini_set('session.name', $params['cookie_name']); by ini_set('session.id', $params['cookie_name']);

I have found many solution here Codeigniter session data lost after redirect and solved my issue too but i wanted to know that difference of session.id instead of session.name. in session library.

Imran Afzal
  • 1
  • 1
  • 3
  • Which CodeIgniter-3 version are you using? in the latest version of Codeigniter 3 this issue doesn't happen. – Hkachhia Apr 03 '19 at 06:52
  • Possible duplicate of [Codeigniter 3 Session not working With PHP 7.1.4](https://stackoverflow.com/questions/43718961/codeigniter-3-session-not-working-with-php-7-1-4) – Hkachhia Apr 03 '19 at 06:53
  • @Hkachhia I am using CI 3.1.9. It is not a duplicate question because i am asking here the reason how it solved my problem but just replacing **session.name** with **session.id**. I want to know the what is difference of using these two. – Imran Afzal Apr 03 '19 at 07:17

0 Answers0