Just as the error name suggests, Failed to read session data occurs because the folder or directory used to store sessions on the website is considered invalid.
Usually, you will get an error message like this
Failed to read session data: user (path: /var/cpanel/php/sessions/ea-php73)To fix this, you actually just need to change the session_save_path in cPanel. However, if you use that method, the session files will be saved directly within your hosting, which might fill up your hosting disk space or inodes.
How to Fix Failed to read session data in cPanel
In this method, we will resolve this error and ensure session files are saved directly on the server rather than appearing in your home folder.
To get started, you just need to log in to your hosting cPanel. Once logged in, you can search for or open the MultiPHP INI Editor page.
Once you are in the MultiPHP INI Editor, select the domain name for which you want to update the session path.
In the session.save_pathsection, change it to one of the following values and then save your changes.
/var/cpanel/php/sessions/ea-php81or
/opt/alt/php81/var/lib/php/sessionIf neither of those paths works, you can change 81 to another PHP version, for example to /var/cpanel/php/sessions/ea-php74 or /opt/alt/php71/var/lib/php/session
Now you can reopen your website, and the error message should be gone, allowing your website to run normally.
If you are using PHP Selector, you can change the session save path by following the tutorial How to Change session_save_path in cPanel and make sure the path uses one of the options above.
COMMENTS
Loading...