Session config not reflecting to website CodeIgniter

1139 views php
2

Default config:

$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;

Error:

is_dir(): open_basedir restriction in effect. File(/var/lib/php/session) is not within the allowed path

Filename: drivers/Session_files_driver.php

Updated config:

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = BASEPATH . 'tmp-sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Error is still the same as above. I also tried database as sess_driver but the error still the same. Any idea on this?

Note: Editing PHP config here is not an option. I can only work with the CI files.

answered question

1 Answer

5

Maybe this one can help you.

Codeigniter open_basedir_restriction in effect on shared hosting

You can use either database for sessions

posted this

Have an answer?

JD

Please login first before posting an answer.