Welcome Guest, Not a member yet? Register   Sign In
set_flashdata & session timeout
#1

(This post was last modified: 08-16-2018, 10:49 PM by rhodium.)

I recently updated from CI 3.1.3 to 3.1.9 and I am now experiencing some strange issues with set_flashdata. 

All session features involving set_userdata() and userdata() work flawlessly. 


Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'sess_';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH.'/ci_sessions/';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

My controller creates a success/confirmation message as flashdata, then followed to a redirect that will output the said message:


Code:
$this->session->set_flashdata('success_message', 'Success!');
redirect( base_url('account/page') );

The page located at account/page successfully displays the success message.  

What happens after this is puzzling. Any action/link I click after this leads to a session timeout. (All pages in this application are protected by session variables and require a logged in user.) The error message taken from the logs looks like this:


Code:
ERROR - 2018-08-15 12:02:39 --> Severity: Error --> Maximum execution time of 300 seconds exceeded
/home/project/public_html/system/libraries/Session/drivers/Session_files_driver.php 212

I ran some test to see if the session variables were still present and they are. (I output all userdata() right after showing the flashdata message, the Profiler also indicates that all session variables are still present.) 

Commenting out the set_flashdata resolves the issue. Anyone experiencing such issues with 3.1.9? (I had no issues with 3.1.3) Perhaps I messed up the update to 3.1.9... 

Any ideas?

UPDATE: I downgraded to 3.1.8 and it resolved the issue. FYI, when using 3.1.9, the session does not necessarily time out, but the page load following the flashdata usage leads to an EXTREMELY slow page load if the page uses sessions. ( well over 3-4 minutes and sometimes times out after 300 seconds. )
Reply


Messages In This Thread
set_flashdata & session timeout - by rhodium - 08-16-2018, 09:57 PM
RE: set_flashdata & session timeout - by jreklund - 08-17-2018, 04:14 AM
RE: set_flashdata & session timeout - by rhodium - 08-29-2018, 09:40 PM
RE: set_flashdata & session timeout - by InsiteFX - 08-30-2018, 08:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB