0
votes

Am using CodeIgniter for my application, my application working fine, but after sometime, when I reload any page than am getting ci_session error.

Please any one help me to solve this issue...

A PHP Error was encountered

Severity: Warning

Message: unlink(/tmp/ci_session074b4d178c387273e3eee244a10cdbafce7e337e [function.unlink]: Operation not permitted

Filename: drivers/Session_files_driver.php

Line Number: 371

Backtrace:

File: /home/applic/public_html/workshop/application/controllers/Reports.php

Line: 7

Function: __construct

File: /home/applic/public_html/workshop/index.php

Line: 292

Function: require_once

1
add your code as well - Abdulla Nilam
what code, when I load any page after sometime application display this error. - Mr Tom
Session code where you have used - Abdulla Nilam
i guess there was a change of ownership of that session file in your /tmp/ directory, can you check the owner? - Efx

1 Answers

0
votes

In the config.php file you MUST set sess_save_path to a valid path. It was initially set to NULL.

$config['sess_save_path'] = BASEPATH . 'cache/';

if you create a folder 'sessions' and put it in your application folder you can use this:

$config['sess_save_path'] = APPPATH.'/sessions'