• Resolved Mad_Jane

    (@mad_jane)


    Hello,

    First of all, thank you so much for this plugin. It was working wonderfully for me until I updated to 5.5. I am using sessions on a website that requires randomization with pagination. Since upgrading to 5.5, the “site health” screen on the dashboard shows this warning:

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

    Using session_write_close() breaks my function. Until the 5.5 upgrade, your plugin allowed me to continue using session_start without triggering any warnings. Any ideas about what’s different in 5.5 that would cause this warning to re-emerge?

    Thanks so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Mad_Jane

    (@mad_jane)

    Me again. I’ve figured out that session_write_close() doesn’t work because of some conflict with the Wordfence plugin. I was able to use session_write_close() successfully on my dev site that does not have Wordfence installed. Installing Wordfence on the dev site created the same warning in “site health.” Only when I deactivated Wordfence, deleted it, and removed all of the tables it left behind in wp_options did the warning message go away. Any ideas about why this might be and any possible workaround? I’d prefer not to get rid of Wordfence on the production site if I can avoid it.

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @mad_jane:

    Any ideas about what’s different in 5.5 that would cause this warning to re-emerge?

    The only thing that’s changed in WordPress 5.5 is that WordPress Core added a Site Health Check for the use of PHP sessions. You can read through that Trac ticket for a bit more detail.

    If you’ve identified that Wordfence is the source of the warning, I think you can ignore the warning for now and wait for Wordfence to fix the underlying issue.

    Hi, I hope it’s ok to jump in.

    I seem to have a similar problem. But I am using Ninja Firewall.
    It makes my backend go v e r y slow.

    I get the error:
    ‘ ini_set(): A session is active. You cannot change the session module’s ini settings at this time’
    in
    ‘wp-content/plugins/wp-native-php-sessions/pantheon-sessions.php:156’

    It does not matter if the plugin ?Native PHP Sessions? is active or not.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Issue with WordPress 5.5’ is closed to new replies.