php error – Failed to read session data…

Home Forums BulletProof Security Free php error – Failed to read session data…

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43709
    carnethy hrc
    Participant

    Hi! We have a constantly recurring php error:

    Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/ea-php70) in /home/carnethy/public_html/wp-content/plugins/bulletproof-security/403.php on line 3

    We are up to php 8.1 now. How can I get this error to go away?

    Thanks!

    #43710
    AITpro Admin
    Keymaster

    The server path in the php error is pointing to PHP 7.0 not 8.1.  You can check the BPS System Info page to see the PHP server version that is running on your site.  If you do not see PHP 8.1 then check your Root htaccess file and BPS Root Custom Code for old php/php.ini handler htaccess code for PHP 7.0.

    The BPS 403.php Security Logging template does do something with Session, but it is after the fact. Example: An error occurs and someone is redirected to the BPS 403.php Security Logging template. The root problem is occurring at a deeper level and that would need to be fixed wherever that is occurring. The end result of a particular problem may appear to be a Session problem due to the original problem redirecting to the logging template which starts a new Session and then destroys that Session. The BPS 403.php Security Logging template is the end result of some other problem/error occurring somewhere else and ending up at the Security Logging template after that problem/error has occurred.

    You can try editing the /wp-content/plugins/bulletproof-security/403.php Security Logging template and comment out the session handling code at the top of that file, but normally you would not want to do that since this code is designed to prevent Session problems.

    <?php session_cache_limiter('nocache'); ?>
    <?php session_start(); ?>
    <?php error_reporting(0); ?>
    <?php session_destroy(); ?>
    #43715
    carnethy hrc
    Participant

    Thanks! Either root or public html had not updated to php 8.1 (I forget which) so after ensuring that they were both updated (confirmed in the BPS System Info page), I’m happy to say the errors appear to have stopped. And I could find no reference to ea-php70 anywhere in any file or settings so I think it’s fixed.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.