• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter throws 502 error CloudFlare while using session

#1
Hi, I'm using the latest version of CodeIgniter
error reproduction

Login system with Ion_auth
config sessions

Quote:$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 2592000; //30 dias
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = $config['sess_expiration'];
$config['sess_regenerate_destroy'] = FALSE;
cloudflare / Crypto / flexible to access the site through https
start session on the web page and when I delete the sessions created directly from the table ci_sessions because they are created demaciadas is when the error 502 cloudflare occurs.
the only way i have found to fix it is to disable cloudflare redirect from https to http and wait a while and start loading the page
looking in google I find that apparently it is problem of the cookies are too large according to this article
https://stackoverflow.com/questions/31501972/codeigniter-throws-520-error-cloudflare-while-using-session

although I'm a rookie and I'm not sure. I appreciate any help.
if I delete my browser's cookies it also stops giving the error
Reply

#2
try 
PHP Code:
$config['sess_driver'] = 'database'//files sess_driver locally
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = 'user_logs'//C:\xampp\tmp save sess locally 
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE//ingore this you  can make it false 
try saving your sessions locally if no errors 
,save them to database make sure database table column name are correct
Code:
    [id] [varchar](128) NOT NULL,
    [ip_address] [varchar](45) NOT NULL,
    [timestamp] [bigint] NOT NULL,
    [data] [text] NOT NULL

regards
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.