Codeigniter 3 session not working

On a web application, session not working. I verified PHP session is working with script

When refreshing the script, the number start increasing, that confirms PHP session works fine on the server.

As for Codeigniter, we need to check the session settings in file application/config/config.php

That looks good. Session will be saved in folder

FCPATH will be replaced with web application root folder where index.php is present. I verified ci_session folder exists and changed its permisison to 777, but that did not fixed the session problem.

To verify session is working, i added 2 function to controller

I can call these functions to verify is session is setting properly with url like yourdomain/controller-name/function-name

The problem was due to PHP 7. To fix it, edit file


Replace with

You can find more about Codeigniter session at

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published.