Configured save path ” is not a directory, doesn’t exist or cannot be created.

Configured save path ” is not a directory, doesn’t exist or cannot be created.

Problem:

when I want to set session data in codeigniter 3 it says error like:


A PHP Error was encountered


Severity: Warning


Message: mkdir(): Invalid path


Filename: drivers/Session_files_driver.php


Line Number: 117


Backtrace:


File: C:xampphtdocsci-testapplicationcontrollerslogin.php
Line: 7
Function: __construct


File: C:xampphtdocsci-testindex.php
Line: 292
Function: require_once





Solution:



$config[‘sess_driver’] = ‘database’;
$config[‘sess_cookie_name’] = ‘ci_session’;
$config[‘sess_expiration’] = 7200;
$config[‘sess_save_path’] = ‘ci_sessions’;
$config[‘sess_match_ip’] = FALSE;
$config[‘sess_time_to_update’] = 300;
$config[‘sess_regenerate_destroy’] = FALSE;


Or
$config[‘sess_driver’] = ‘database’;
$config[‘sess_cookie_name’] = ‘ci_session’;
$config[‘sess_expiration’] = 7200;
$config[‘sess_save_path’] = sys_get_temp_dir();
$config[‘sess_match_ip’] = FALSE;
$config[‘sess_time_to_update’] = 300;
$config[‘sess_regenerate_destroy’] = FALSE;

Related posts

Leave a Comment

//onvictinitor.com/afu.php?zoneid=2162206