Why This Solution Works on CI3 and PHP 7.1+ |
I have a CI3 (3.1.11) project on IIS with PHP 7.0 . It works without any error for years. Today i need to upgrade my projects environment to PHP 7.2.7 and then very big session problem occured.
When i login to my system with ajax request, after redirect to main page everything about session has been reset. I searched this forum and stackoverflow for this problem, writing a lot of solutions at them. I tried to delete all of system folder and then downloaded latest from here and moved new system folder to my projects folder but it isn't solved anything. When i downgrade to 7.0 everything works perfectly but when i change php version to 7.2 session fails to save. A lot of hours later, i found a solution writes as this: Code: if you are working in CI 3.x and just upgraded your server php version to php 7.x Go to system/libraries/Session/session.php at Line no 281 and replace ini_set('session.name', $params['cookie_name']); by ini_set('session.id', $params['cookie_name']); i don't understand but this solution solved my problem but i don't like to touch system folder files. And now: are there any different solution to solve this problem without touch system folder files? If there isn't, why don't you merge this solution to your hard code of CI?
I'm a person from Turkiye. I don't know English very well and i can't write what i want to say sometimes (as now happenes
![]() If i write something by mistake; please don't distress it and try to understand what i want to write.
Go here and download the CodeIgniter 3.2 Developer version.
CodeIgniter 3.2 Developer What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |