An uncaught Exception was encountered
Type: Exception
Message: Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process.
Filename: prm\system\libraries\Session\drivers\Session_files_driver.php
Line Number: 125
Backtrace:
File: \prm\application\controllers\login.php Line: 8 Function: __construct
File: \prm\index.php Line: 279 Function: require_once
Not able to fix this issue. please suggest how to fix this
We are setting up 'C:\Windows\Temp' windows directory path to database ci_session table.
change the following in your config file.
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
to
$config['sess_driver']= 'database';
$config['sess_cookie_name']= 'mycookie';
$config['sess_expiration']= 0;
$config['sess_save_path']= 'ci_session';
$config['sess_match_ip']= FALSE;
$config['sess_time_to_update']= 300;
$config['sess_regenerate_destroy']= FALSE;
$config['sess_use_database']= TRUE;
$config['sess_expire_on_close']= TRUE;
$config['sess_table_name']= 'ci_session';
Edit config.php
Location: application/config/config.php
Before
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
After
$sessDir = session_save_path();
$sessDir = "{$sessDir}/sessionPath";
is_dir($sessDir)?:mkdir($sessDir);
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = $sessDir;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
It's work for me
In your application's config.php file search for $config['sess_save_path'] change its default value of sys_get_temp_dir() to another publicly accessible directory preferably not in the C: drive.
or you can set it globally in your php.ini file and call ini_get ('session.save_path'), but first make sure you have changed the default value of that option to a temp directory of your choice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With