HostOnNet Blog

session not working in php

Looking for Linux Server Admin or WordPress Expert? We can help.

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.