• Resolved barbaree

    (@barbaree)


    Hello everybody,

    I’ve updated woocommerce plugin with the latest update, and I’m getting a critical issue in site health status in wordpress:

    “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.”

    I have deactivated woocommerce plugin, and it went away. Is there something that I can do please?

    Thank you,

    Kind regards,

    Barbara

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support mouli a11n

    (@mouli)

    Hi there!
    Issues like this may be caused by either a conflict with your theme or with another plugin. You can read more about plugin and theme conflicts here:
    https://docs.woocommerce.com/document/woocommerce-self-service-guide/

    The best way to determine if the issue is being caused by a theme and/or plugin is to do the following:

    1. Temporarily switch your theme back to the Storefront (https://www.woocommerce.com/storefront/) or TwentyNineteen (https://www.ads-software.com/themes/twentynineteen/) Theme.
    2. Disable all plugins except for WooCommerce.
    3. Test to see if the issue has been resolved.

    If that resolves the issue, then one-by-one you can switch back your theme and re-enable your plugins, testing in between, until you find the one causing the conflict.

    If doing this on your live site is not possible, can you create a duplicate site? We suggest using WP Staging (https://www.ads-software.com/plugins/wp-staging/) if your hosting provider does not offer a staging server as an option.

    I hope that helps you to figure it out.
    Feel free to get back to us if you have further questions.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hi @barbaree

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thanks,

    I was facing same issue.

    I replaced the code

    session_start();
    with

    if (!isset($_SESSION)) {
      session_start(['read_and_close' => true]);
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Site health status: Critical issue “An active PHP session was detected”’ is closed to new replies.