[wp-trac] [WordPress Trac] #47320: Site Health: Call to API with $_COOKIE and PHPSESSID
WordPress Trac
noreply at wordpress.org
Mon Aug 12 12:37:35 UTC 2019
#47320: Site Health: Call to API with $_COOKIE and PHPSESSID
-------------------------------+------------------------------
Reporter: matthieumota | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 5.2
Severity: trivial | Resolution:
Keywords: site-health close | Focuses:
-------------------------------+------------------------------
Comment (by netweblogic):
For anyone wondering, if you open a session early to load up $_SESSION
variables, and then session_write_close(), you can reopen it and write at
any point in time by just using session_start() again, writing what you
need and closing it right after.
If the session is open early on, headers are sent and starting a session
even after headers are sent is not going to cause any warnings/errors.
I've found in my case this gets around any session locking issues and
allows you to read/write to sessions without any hindrance.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47320#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list