Introduction
cPanel cleans sessions based on the default session naming format sess_*
, if a user needs to increase the default value, they will need to use a custom session directory. If you wish to use a custom garbage collection time you will need to use a custom session folder.
Procedure
You will first need to create a directory as the user to hold the sessions:
[sean2@test2 ~]$ mkdir sessions -v
mkdir: created directory ‘sessions’
[sean2@test2 ~]$
After creating the new sessions directory update your php.ini for the user using the MultiPHP INI Editor:
session.save_path = "/home/example/sessions"
If you use a custom session path cPanel will no longer manage the sessions, and you will need to use a custom script to clean up the session files.