Can I safely delete the sessions in cagefs/var/cpanel/php/sessions/ea-phpxx (xx being the version) in cpanel?
I have over 1 gb of space occupied with them and they are 3-4 months old.
Can I safely delete the sessions in cagefs/var/cpanel/php/sessions/ea-phpxx (xx being the version) in cpanel?
I have over 1 gb of space occupied with them and they are 3-4 months old.
3
Answers
It seems that these sessions files can be removed (at least I tried for php 7.0 via ftp and did not receive any notification/warning about it).
The problem with the 5.4 was that the folder was deleted and recreated...
like in this link folder "ea-php55" deleted, now session doesn't work
I resolved that by setting the session path to /var/cpanel/php/sessions/ea-php55 instead of /var/cpanel/php/sessions/ea-php54 and using still php 5.4
You can add this command end of session.pm on this directory ‘/usr/local/cpanel/Cpanel/config/session.pm’
This command clear all session in to
‘/usr/local/cpanel/Cpanel/Session/* ‘
REF
I had the same problem (with inodes saturation) and deleted the files without problems.
According to the suggestion by the Administrator of the cPanel forum referenced by @Hamed, I made a small script to be used in a cronjob. Hope this can help others (use with care at your own risk):
In this case the script deletes all session files older than 30 days.