{"id":14863148,"date":"2021-09-12T10:53:24","date_gmt":"2021-09-12T10:53:24","guid":{"rendered":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/topic\/site-health-errors-active-php-session-rest-api\/"},"modified":"2021-09-12T10:53:24","modified_gmt":"2021-09-12T10:53:24","slug":"site-health-errors-active-php-session-rest-api","status":"publish","type":"topic","link":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/topic\/site-health-errors-active-php-session-rest-api\/","title":{"rendered":"Site health errors &#8220;active PHP session&#8221; &amp; &#8220;REST API&#8221;"},"content":{"rendered":"<p>When this plugin is activated the Site Health Status shows:<br \/>\n&#8220;2 critical issues<br \/>\nAn active PHP session was detected<br \/>\nThe REST API encountered an error&#8221;<br \/>\nDeactivate the plugin and those two issues go away.<\/p>\n<p>I found this by following the Site Health advice &#8220;A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.&#8221;<\/p>\n<p>I searched my entire site for session_start() and checked the code where it is used.  The only instance where it appears without the close() is in<br \/>\npublic_html\/wp-content\/plugins\/custom-contact-forms\/classes\/class-ccf-form-handler.php<\/p>\n<p>I tried disabling each plugin and it was only by disabling this one I could make the problem go away.<\/p>\n","protected":false},"template":"","class_list":["post-14863148","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14863148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14863148\/revisions"}],"wp:attachment":[{"href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=14863148"}],"curies":[{"name":"wp","href":"https:\/\/round-lake.dustinice.workers.dev:443\/https\/api.w.org\/{rel}","templated":true}]}}