PHP Error Log Question

Home Forums BulletProof Security Pro PHP Error Log Question

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42183
    Living Miracles
    Participant

    Hello,

    I’m curious about an aspect of the PHP Error Log functionality in BPS Pro under PHP Options > PHP Error Log > PHP Error Log Location Set To:

    It’s my understanding that all PHP errors that occur will be logged at the file path described in the “PHP Error Log Location Set To:” field. Currently for all our websites, this path is set to the recommended value of /XXXXXX/wp-content/bps-backup/logs/bps_php_error.log. However, we’ve noticed in general that when issues arise with various plugins that generates a lot of PHP errors, the error logs that are quarantined are in multiple different locations. The error log files seem to be generated near the file which caused the error, not the error log path set by BPS Pro. For example, for a recent issue on one of our websites, PHP errors were generated and logs created at a few places including:

    /XXXXXX/wp-includes/sodium_compat/namespaced/Core/php_errorlog
    /XXXXXX/wp-includes/SimplePie/Cache/php_errorlog

    No logs were for these php errors were generated at /XXXXXX/wp-content/bps-backup/logs/bps_php_error.log, which is what I would expect given the way BPS Pro is set up for our websites. Am I understanding the functionality of this feature correctly, where if the BPS Pro Error Log is working properly, it should combine all PHP error logs into one file at the location we choose at PHP Options > PHP Error Log > PHP Error Log Location Set To:, and that the errors should no longer be logged in multiple different locations? If so, can you think of a reason why this functionality would not be working across all of our websites?

    Thanks for your help!

    #42184
    AITpro Admin
    Keymaster

    This same thing happens on all my sites.  It started a year ago or maybe longer.  Not sure if it is a new WordPress thing or a web host/cPanel thing or a PHP thing.  The important thing is that any php errors that are relevant to something that needs attention will be logged/displayed in the BPS PHP Error log.

    #42185
    Living Miracles
    Participant

    I see. So just to confirm, are you saying that:

    1. If the PHP error doesn’t show up in the BPS Pro error log, and instead shows up in another location or multiple locations, it’s not important and we can ignore it?
    2. All important PHP errors to which we should give some attention, would be caught by the BPS Pro error log?

    If this is the case, and it’s also happening on your sites, I’m curious what you do for errors that show up in separate PHP error logs and don’t appear in the BPS Pro error log, which would be less important.  Do you just whitelist the PHP error logs that are generated in separate places and don’t show up in the BPS Pro Error Log so that they don’t even get quarantined anymore? Or do you still check the separate error logs that get quarantined manually, even though they are not very important? Or something else / some balance between these two extremes?

    Thanks!

    #42186
    AITpro Admin
    Keymaster

    I use the Quarantine exclude files form at the top of Quarantine page to exclude the php error logs that are generated under WordPress Core folders.  So yeah I just ignore them since they are not important and are not anything that can be fixed since you should never edit WP Core files.  I assume the WP folks will eventually fix those WP Core files php errors.  So yeah you only need to be concerned with php errors that show up in the BPS PHP Error log.

    #42189
    Living Miracles
    Participant

    Ok, that makes sense! Thanks for sharing about this.

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