PHP Error Log setting isn’t sticking

Home Forums BulletProof Security Pro PHP Error Log setting isn’t sticking

Tagged: 

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #38761
    BHA
    Participant

    I keep getting the following banner alert

    PHP Error Log Path Does Not Match
    The PHP Error Log Location Set To: folder path does not match the Error Log Path Seen by Server: folder path.
    Click Here to go to the PHP Error Log page and click the Htaccess Protected Secure PHP Error Log Read Me button for troubleshooting steps.

    I’ve double checked wp-config and the “@ini_set(‘error_log’,” is set to the absolute path to “wp-content/bps-backup/logs/bps_php_error.log”.

    The php.ini in my WP root has “error_log = /homedir/public_html/boydhanaleiako/wp-content/bps-backup/logs/bps_php_error.log”

    I’ve clicked the “Set Error Log Location”, “Test Error Log”, and “Reset Last Modified time in DB” button several times.

    The BPS PHP info error_log value states the same absolute path in the php.ini and wp-config.

    #38763
    AITpro Admin
    Keymaster

    What do you see for this check/value:  “Error Log Path Seen by Server” on the PHP Error Log page?

    #38769
    BHA
    Participant

    The ABS file path that I set as mentioned before.

    #38774
    AITpro Admin
    Keymaster

    Ok send me a WordPress Administrator login to your website so I can figure out the problem.  Send your website login information to info at ait-pro dot com.

    #38784
    BHA
    Participant

    Done.

    #38785
    AITpro Admin
    Keymaster

    I received your login information and am logged into your site and working on the problems.

    #38790
    AITpro Admin
    Keymaster

    I’ve noticed in the last year that BlueHost has some missing help page info so I’m going to document them here for future reference.

    #1. The BlueHost php/php.ini handler help page has not been updated in a long time with current help info. So the solution is if you have chosen PHP 7.2 in cPanel then you need to use this php/php.ini handler htaccess code: AddHandler application/x-httpd-ea-php72 .php

    #2. You need to use this default php error log path: error_log for the BPS Pro “PHP Error Log Location Set To” path.

    #38791
    AITpro Admin
    Keymaster

    Additionally, this option setting below needs to set/changed in BPS Pro S-Monitor settings to compensate for this error message > “PHP Error Log Path Does Not Match”.

    PHP Error Log: Check Folder Path Location Alert > change this option setting to > Turn Off Displayed Alerts.

    For some reason BlueHost seems to strip out wp-admin htaccess file Query String Exploits code so probably the best solution would be to disable the wp-admin htaccess file by doing the steps below:

    1. Go to the BPS Setup Wizard page > Setup Wizard Options tab page.
    2. Change this option setting > Enable|Disable wp-admin BulletProof Mode > to wp-admin BulletProof Mode Disabled.
    3. Click the Enable|Disable button.

    #39856
    Dave Buettler
    Participant

    Hello

    I have a similar problem, in wp-config I can’t see anything important, error log path is:

    /home/clients/xxxxx/sites/illuminatoren.com/wp-content/bps-backup/logs/bps_php_error.log

    When I click “Test Error Log” anything seems to be fine.

    But I get this message:

    PHP Error Log Path Does Not Match
    The “PHP Error Log Location Set To” value does not match the “Error Log Path Seen by Server” value.
    Click Here to go to the PHP Error Log page.
    Copy the “Error Log Path Seen by Server” value: blank/none into the “PHP Error Log Location Set To” text box and click the Set Error Log Location button to fix this unless you see “blank/none” for the value.
    If you see “blank/none” for the value you will need to contact me for help to fix this. Use this contact email address: info @ ait-pro.com.

    Thank you, kind regards
    Dave from Switzerland

    #39857
    AITpro Admin
    Keymaster

    @ Dave Buettler – Open your wp-config.php file and check for the BPS ini_set Options code. An example of the BPS ini_set Options code is shown below. Let me know if you see the ini_set Options code in your wp-config.php file or not.

    /* That's all, stop editing! Happy blogging. */
    
    /** Absolute path to the WordPress directory. */
    /** BEGIN BPS Pro ini_set Settings **/
    @error_reporting(E_ALL|E_STRICT);
    @ini_set('log_errors','On');
    @ini_set('error_log',''); // add the path to your php error log
    @ini_set('log_errors_max_len','1024');
    @ini_set('memory_limit','256M');
    @ini_set('session.cookie_httponly','On');
    @ini_set('session.use_only_cookies','On');
    @ini_set('session.cookie_secure','Off');
    @ini_set('ignore_repeated_errors','On');
    @ini_set('ignore_repeated_source','Off');
    @ini_set('allow_url_include','Off');
    @ini_set('define_syslog_variables','E_ALL|E_STRICT');
    @ini_set('display_errors','E_ALL|E_STRICT');
    @ini_set('display_startup_errors','Off');
    @ini_set('implicit_flush','Off');
    @ini_set('magic_quotes_runtime','Off');
    @ini_set('max_execution_time','120');
    @ini_set('mysql.connect_timeout','30');
    @ini_set('mysql.trace_mode','Off');
    @ini_set('report_memleaks','On');
    /** END BPS Pro ini_set Settings **/
    #39858
    Dave Buettler
    Participant

    Dear @AITpro Admin, thank you for your fast reply.

    I checked wp-config and there is just ZERO NOTHING from BPS pro ini settings, not even a comment line.

    It’s a clean wordpress installation and BPS was maybe even the first plugin I installed and I changed nothing in the wp-config beside of yesterday the implementation of the Amazon SES AWS Access keys…

    With BPS pro I made the normal setup wizard process (inclusive pre-wizard check first) and anything seemed to be fine, also the Auto Restore function seems to work etc.

    What could be the reason for this?

    #39859
    AITpro Admin
    Keymaster

    Do these steps and let me know if you see any error messages or if this works or not.

    1. Copy the BPS ini_set Options code that I posted in my previous reply into your wp-config.php file right after this commented out text in your wp-config.php file:  /* That's all, stop editing! Happy publishing. */
    Note: If/when your wp-config.php file is quarantined, restore the wp-config.php file from BPS Pro Quarantine.
    2. Go to the BPS Pro > P-Security > PHP Error Log page and copy the ini_set PHP Error Log Location (Recommended) php error log path.
    3. Go to the ini_set Options tab page and paste the php error log path into the ini_set PHP Error Log Location Set To text box.
    4. Click the Save|Enable Options button.

    #39860
    Dave Buettler
    Participant

    Great, I did all as described, it worked well and now the warning is gone. I guess anything is fine now? Thank you!

    But I am curious for the next website I will set up, if this process will be the same with the manual insertion of this line to the wp-config.php?

    So anyway, THANK YOU for the great customer service! 🙂 🙂 🙂

    #39861
    AITpro Admin
    Keymaster

    @ Dave Buettler – If the wp-config.php file is in the default location for WordPress (the WordPress installation folder) and has not been moved to a different folder then running the Pre-Installation Wizard and Setup Wizard should create the ini_set Options code in your wp-config.php file.  I’m not sure why the ini_set Options code was not added/created in your wp-config.php file when you ran the BPS Pro Wizards.

    #39895
    jenni101
    Participant

    Hello,

    I had the same warning showing when I initially installed BPS Pro in a new WP site.

    When I looked this file (/home/me/public_html/my-site.co.uk/wp-admin/php_errorlog) was set as the error log pathway, and was in quarantine. So I followed instructions and reset the error file path to php_errorlog (which is still saved) and restored the file that was in quarantine.

    That seems fine, and no further notices re. the error path being incorrect… however the original file that was quarantined at the time of install (/home/me/public_html/my-site.co.uk/wp-admin/php_errorlog) keeps getting quarantined – Is it OK to delete it? Or is it needed? and I need some other setting to stop it from being quarantined?

    Thank you in advance.

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