Support » Plugin: Eazy CF Captcha » PHP Session staying active / REST API issues + FIX

  • This plugin causes 2 critical issues on Site Health tests.

    WHen the plugin is installed, you get these issues:

    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 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 10001 milliseconds with 0 bytes received (http_request_failed)

    I Fixed the issue by editing the EazyCFCPublicBase.php file which is located here:
    /includes/PluginPublic/EazyCFCPublicBase.php

    I changed this line:

    if ( !session_id() ) {
        session_start();
    }


    to:

    if ( !session_id() ) {
        session_start( [
            'read_and_close' => true,
        ] );
    }
    • This topic was modified 11 months, 2 weeks ago by tjdyo.
    • This topic was modified 11 months, 2 weeks ago by tjdyo.
    • This topic was modified 11 months, 2 weeks ago by tjdyo.
    • This topic was modified 11 months, 2 weeks ago by tjdyo.
  • The topic ‘PHP Session staying active / REST API issues + FIX’ is closed to new replies.