mkdir(): Invalid sess_save_path Codeigniter on DirectAdmin
Facing issue with Codeigniter website on DirectAdmin Panel after Migration? Error mkdir(): Invalid sess_save_path Codeigniter error on front-end. This occurs when a website is unable to find any global variable for the session path. The sess_save_path is Codeigniter variable in the config file of the website which specifies the storage location, depends on the driver being used.
CodeIgniter is an Application Development Framework – a toolkit – for people who build web sites using PHP. Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch, by providing a rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task.
Your front-end error should be similar to the below image for invalid sess_save_path Codeigniter Error.
To fix this error/problem we just need to update the website’s config.php sess_save_path variable. It can be done by following the simple steps below.
- Login to DirectAdmin File Manager or FTP where you can edit Session related preferences in your application/config/config.php file of the website.
- Find the following line in the config.php file,
$config['sess_save_path'] = NULL;
and change it to the following and save the file.
$config['sess_save_path'] = sys_get_temp_dir();
- After saving the config file the front-end error should be resolved.
With this, we finish fixing the Invalid sess_save_path Codeigniter on DirectAdmin Server.