Welcome Guest, Not a member yet? Register   Sign In
Performance Problem [solved]
#11

(08-17-2017, 08:51 AM)Narf Wrote:
(08-17-2017, 07:22 AM)bitwiz Wrote: PHP usually calls session_write_close() automatically after code execution (and I was used to that happening), I read on the forum someone asked if it was okay to place it in __destruct() and the response was no and I didn't understand their reasoning, sorry I don't remember where I read that.

__destruct() will rarely be called when you need it, and is kind of unpredictable at times.

(08-17-2017, 07:22 AM)bitwiz Wrote: If I want to simulate PHP's call on script completion where would I place session_write_close() or is there a way to turn that automation back on?

Is that this variable? $config['sess_regenerate_destroy'] = FALSE;

No, sess_regenerate_destroy has nothing to do with it and it's already automated - PHP will close the session itself. Point of calling session_write_close() yourself is that you know it will be beneficial to do it at a certain execution point, there's no way to automate that.

Thank you for the clarification.
Reply


Messages In This Thread
Performance Problem [solved] - by bitwiz - 08-16-2017, 05:46 PM
RE: Performance Problem - by kilishan - 08-16-2017, 07:50 PM
RE: Performance Problem - by bitwiz - 08-16-2017, 09:27 PM
RE: Performance Problem - by Paradinight - 08-16-2017, 09:46 PM
RE: Performance Problem - by bitwiz - 08-17-2017, 06:32 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 07:22 AM
RE: Performance Problem - by Narf - 08-17-2017, 08:51 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 09:06 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 08:59 AM
RE: Performance Problem - by Diederik - 08-17-2017, 12:15 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 08:51 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 09:10 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 10:02 AM
RE: Performance Problem - by Narf - 08-17-2017, 10:06 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 10:42 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 11:05 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 11:43 AM
RE: Performance Problem - by bitwiz - 08-17-2017, 12:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB