Welcome Guest, Not a member yet? Register   Sign In
session_write_close(): Failed to write session data using user defined save handler
#1

Hello,

I want to allow concurrent requests from a client for simultaneous AJAX calls. 
In each php function called, I start my code with session_write_close() to unlock the session. But I randomly get this message : 

Code:
session_write_close(): Failed to write session data using user defined save handler.

I'm using redis and everything work fine. Just getting this message sometimes in my logs.

Any idea?
Cheers
Reply
#2

Read the user comments here:

PHP.net - session_write_close

It seems that the output buffering is causing session problems on php 7+
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Oh, nice catch ! I will try to disable it and see what happend Smile
Thanks for your answer
Reply
#4

(10-28-2021, 01:34 AM)InsiteFX Wrote: Read the user comments here:

PHP.net - session_write_close

It seems that the output buffering is causing session problems on php 7+

Well, I set output buffering = off in php.ini but it doesn't solve the problem. I still get "Failed to write session data using user defined save handler" randomly.

I find this thread on stackoverflow : https://stackoverflow.com/questions/3411...ssion-data
Not sure if the selected answer can apply to codeigniter ? I'm using Redis.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB