Issue
Sometimes you may face the following issue with your website:
The php session save path /var/cpanel/php/sessions/alt-phpXX is not writable
Environment
- CloudLinux 7/8
- cPanel
Solution
1. To solve the problem you need to do the following actions:
mkdir -p /home/username/whmcsdata/sessions
chmod 1750 /home/username/whmcsdata/sessions
chown username:username /home/username/whmcsdata/sessions
2. Change the session.save_path for the user in cPanel > PHP Selector > Options.
Please note: You need to change the "username" value to the name of your real user
3. Then please make sure that the following lines are present in the /etc/cagefs/cagefs.mp file:
@/var/cpanel/php/sessions/alt-php72,700
@/var/cpanel/php/sessions/alt-php73,700
@/var/cpanel/php/sessions/alt-php74,700
@/var/cpanel/php/sessions/alt-php80,700
@/var/cpanel/php/sessions/alt-php81,700
4. If they are absent, please add them to this file and run the following command to apply the changes:
cagefsctl --force-update
cagefsctl -M
Comments
0 comments
Please sign in to leave a comment.