{"id":19025172,"date":"2026-09-21T10:14:46","date_gmt":"2026-09-21T10:14:46","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-session-never-gets-closed\/"},"modified":"2026-09-21T10:14:46","modified_gmt":"2026-09-21T10:14:46","slug":"php-session-never-gets-closed","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-session-never-gets-closed\/","title":{"rendered":"PHP Session never gets closed"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hello Adrian,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">when set in the options, your plugin opens a PHP session within the file <code>frontend\/controllers\/main.class.php<\/code> in line 101 using <code>session_start()<\/code>. However, I don&#8217;t see any calls to <code>session_write_close()<\/code> to close this session in any plugin file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Leaving a PHP session open can adversely affect REST API and loopback calls due to session file lock.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please add <code>session_write_close()<\/code> to your code to close the session at an appropriate time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Kind regards,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Florian<\/p>\n","protected":false},"template":"","class_list":["post-19025172","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19025172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/19025172\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=19025172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}