Closed hellofarhan closed 9 years ago
What do you mean by continuously?
After configure the session storage as database in testing server I checked the session table. Each and every second the session row is inserting into session table. until now table row is increasing one by one.
Did you make sure you cookie settings are correct? Specifically the domain and path parts must match those of your site's location.
Yes I checked. It has the default configuration and my domain is not subdomain. And before session driver was cookie with database. on that time it was working perfectly. After upgrading of new version of CI it is happening.
Did you change your database table structure accordingly then?
Yes of course. I followed all steps from this link http://www.codeigniter.com/userguide3/libraries/sessions.html
Please post your session and cookie settings.
$config['sess_driver'] = 'database'; $config['sess_cookie_name'] = 'KingSession'; $config['sess_expiration'] = 0; $config['sess_save_path'] = 'king_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE;
$config['cookie_prefix'] = ''"; $config['cookie_domain'] = ''"; $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE;
Hmm ... and what is the domain name that you use to access that?
I restarted the server. Still increasing session rows.
After lots of works I found the problem. I am using varnish cache with apache. The problem is if I disable varnish cache everything working fine but if I enable the varnish cache again it is starting to insert session rows each and every second. I am using the following varnish configuration. https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
I am using session with database. Data is inserting continuously. I don't know what is going on.