Intermittent Session Error in Codeigniter

Asked

Viewed 219 times

-1

I have a problem in the projects I develop that intermittently generates a Session error, but the error is only when the project is hosted on the web server (I use Cpanel from a Hostgator resale).

When the error happens, if the user presses "F5" or simply changes page(when possible) the error disappears, until today I could not generate the error twice or more after.

Follows images of error. Erro que de vez em quando aparece no site ou sistema

Following is the image of the code used (it is highlighted in the yellow rectangle) who is rotated and who may possibly be causing the error. Código utilizado

Site url so they can try to generate the error: www.ravsistemas.com.br OBS.: So that I can generate the error faster I usually open the site in two browsers and in one of the browsers I keep switching pages or updating the page.

1 answer

1

This happens because the system is not allowed to manipulate the session file in the default tmp system directory. To fix configure the variable $config['sess_save_path'] in the archive application/config/config.php as follows:

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

So the session files will be saved in system/cache

Browser other questions tagged

You are not signed in. Login or sign up in order to post.