• Hello,

    After activating this plugin, two critical issues appeared in our Site Health check. The first is:
    An active PHP session was detected.
    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.

    The second is:
    The REST API encountered an error
    The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

    The REST API request failed due to an error.
    Error: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received (http_request_failed)

    We are using WordPress 5.7.1 and PHP 7.3.28

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Crowd Favorite

    (@crowdfavorite)

    Hi @devteamzeal! Can you please try using the latest version of Conditional Content, version 2.1.0, and check again?

    Thank you, have a great day!

    Thread Starter devteamzeal

    (@devteamzeal)

    Hi there,

    I’ve just tried updating the plugin to version 2.1.0 and that did not resolve the critical issues. It seems to be linked to the session_start() on line 13 of conditional-content-cf-lite\public\class-cf-cc-public.php. There is no session_write_close() within the file, hence the critical issue saying “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.” When I add session_write_close() to the end the critical issues no longer appear in the site health check.

    I’d like to implement this fix but don’t want to edit the plugin directly. What would be the best way to implement this fix?

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Critical issues in Site Health check’ is closed to new replies.