1

I am getting two critical issues in the WordPress Site Health section. These are:

  1. 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.

  1. The Rest API encountered an error

The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.

When testing the REST API, an error was encountered:

REST API Endpoint: https://www.example.org/wp-json/wp/v2/types/post?context=edit REST API Response: (http_request_failed) cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received.

...

There were similar reports three/four years ago, and the conclusion then was that it was nothing to worry about as the WordPress Core does not use sessions, whereas CIVICRM does use them. Is this still the case?

Some of the discussion about this is in this thread:

WordPress Site Health contains critical errors unless CiviCRM is disabled

and through the links found on the page.

If it is nothing to worry about, perhaps something could be added to the installation documentation about this known issue, so newbies like myself are pre-warned.

Thanks

Neil

1 Answer 1

2

CiviCRM 5.28.2 triggering "critical issue" in WordPress 5.5 Site Health

This is not an issue with CiviCRM. It's a failure of Site Health to consider that other plugins may use sessions

3
  • How can this information be added to the installation documentation so newbies like myself are pre-warned?
    – Neil
    Commented Jan 3 at 23:09
  • I am unsure how we could document this in a way that is visible. We could add our own hook into Site Health and put the notice there, but we'd need to find the time to do this. Commented Jan 5 at 12:31
  • That would be so useful. It would be right there in your face when you become aware of the issue.
    – Neil
    Commented Jan 7 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.