• Resolved digbymaass

    (@digbymaass)


    I’m getting thousands of errors in the cpanel php error log –

    [30-Dec-2020 09:30:53 UTC] PHP 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
    [30-Dec-2020 09:30:53 UTC] PHP Warning: session_start(): open(/var/cpanel/php/sessions/ea-php70/sess_79afb7fd10d1dcfd7b25c5dfd31c0197, O_RDWR) failed: Permission denied (13) in /home/carnethy/public_html/wp-content/plugins/bulletproof-security/403.php on line 3

    Root PHP.ini is set in cpanel’s multiPHP INI editor to

    session.save_path = “/var/cpanel/php/sessions/ea-php73”

    Home directory PHP.ini is set to

    session.save_path = “/var/cpanel/php/sessions/ea-php72”

    System Info in BPS:
    PHP Server|PHP.ini Info
    PHP Version: 7.4.13
    PHP Configuration File (php.ini): /opt/cpanel/ea-php74/root/etc/php.ini
    PHP Upload Temp Dir: Not set/defined or directory is not writable
    Session Save Path: Not set/defined or directory is not writable

    How do I set the Session Save Path in BPS? Should it agree with the current root path or home path? I assume those paths were set automatically – should I change them? Obviously neither are ea-php70 as in the error log.

    It’s all very confusing.

    • This topic was modified 3 years, 11 months ago by digbymaass.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author AITpro

    (@aitpro)

    Your session.save_path directive setting should match your PHP server version, which is PHP 7.4.x: session.save_path = “/var/cpanel/php/sessions/ea-php74”. Change your cPanel multiPHP INI editor setting to: session.save_path = “/var/cpanel/php/sessions/ea-php74”. Change your custom php.ini file (Home directory PHP.ini) directive setting to: session.save_path = “/var/cpanel/php/sessions/ea-php74”.

    Note: It could take up to 15 minutes for your server to refresh and update your PHP configuration setting changes.

    Check this BPS Custom Code text box: 1. CUSTOM CODE TOP PHP/PHP.INI HANDLER/CACHE CODE and make sure there is not any php/php.ini handler htaccess code in that Custom Code text box. cPanel PHP 7.4.x versions no longer require php/php.ini handler htaccess code. Delete any php/php.ini handler htaccess code if you see it in BPS Custom Code, save your edits/changes and activate Root folder BulletProof Mode again.

    Let me know if you are still seeing the php errors after making these changes. There may be some sort of issue, problem or conflict with the other plugins that you have installed… W3TC, CloudFlare and Wordfence.

    Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/
    
    Page Caching using disk: enhanced 
    Database Caching 1/214 queries in 0.428 seconds using disk (Request-wide modification query)
    
    Served from: carnethy.com @ 2020-12-30 15:09:53 by W3 Total Cache
    • This reply was modified 3 years, 11 months ago by AITpro.
    Thread Starter digbymaass

    (@digbymaass)

    Thanks for the clear instructions. Didn’t find any php/php.ini handler htaccess code in the Custom Code text box. No further errors reported so far, so fingers crossed!

    Plugin Author AITpro

    (@aitpro)

    Great! Thanks for confirming that worked.

    Thread Starter digbymaass

    (@digbymaass)

    Hmm. Spoke too soon. Same error. But the fault is not in BPS.
    Terminal path to sessions shows –

    root@vps [/var/cpanel/php/sessions]# ls
    ./ ../ ea3/ ea-php54/ ea-php56/ ea-php70/ ea-php72/ ea-php73/ ea-php74/

    Permissions for ea-php70 differed from the others –

    drwxr-xr-x 2 root root 4096 Aug 9 2018 ./
    drwx–x–x 9 root root 4096 Sep 2 07:30 ../

    compared the others –

    drwx-wx-wt 2 root root 4096 Dec 3 2017 ./
    drwx–x–x 9 root root 4096 Sep 2 07:30 ../

    So I’ve changed them to match. I’ve also restarted various Apache services which I saw recommended somewhere.

    Something will work eventually. Or I can just turn off error reporting! Or delete the ea-php70 directory.

    Plugin Author AITpro

    (@aitpro)

    Or you can use your /tmp directory to save PHP session files. ??

    session.save_path = “/tmp”.

    Plugin Author AITpro

    (@aitpro)

    Assuming all questions have been answered – the thread has been resolved. If the issue/problem is not resolved or you have additional questions about this specific thread topic then you can post them at any time. We still receive email notifications when threads have been resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Where do I set the Session Save Path in BPS?’ is closed to new replies.