session not working in php

On a new server, PHP session was not working. This server have a cpanel installed before, i have uninstalled it, there is no proper way of uninstalling cpanel, so i just removed all related cron jobs and cpanel folders.

To fix the PHP session problem i checked session.save_path which was set to /tmp, on checking i found it is read only.

It may be due to securetmp service of cpanel disabled during uninstallation. I set path to

session.save_path = “/var/tmp”

in php.ini and restarted apache, session started working.


Posted in PHP