• Resolved 4p0hk

    (@4p0hk)


    Hello,

    I’ve attempted to configure this plugin on my Dreamhost WP site but am not seeing any log file activity after following the instructions.

    Line 115/116 of my wp-config (sanitized):

    /** Sets logging directory up for Jeepers Peepers syslog plugin */

    define('BLOBAUDIT_LOG_PATH', '/wp-log/jeepers-peepers-wp-syslog.log');

    Note, I also tried the full path with /home/$user/$site to the same effect.

    The only thing showing up in my debug.log after enabling logging:

    PHP Notice: Constant BLOBAUDIT_LOG_PATH already defined in /home/$user/$website/wp-config.php on line 116

    In the wp-log directory, there’s no file being generated with this config in place. I’ve verified:

    • Log directory permissions are read/write for the same user correlated to the WP install
    • Log directory is located in the same folder as wp-config file (and locked down via .htaccess)
    • PHP is 7.4
    • WP is 6.1.1
    • Linux/Apache host
    • Single site (shared hosting though, not sure if that is the same for this context)

    I wasn’t sure about open_basedir being configured for my PHP, and I picked a location within the writable web root structure hoping to avoid permissions issues related to the hosting environment.

    Any ideas or tips?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Blobfolio

    (@blobfolio)

    Hi @4p0hk,

    Unless you accidentally placed two define('BLOBAUDIT_LOG_PATH') lines within your wp-config.php file, it sounds like the WP bootstrap is running before your custom definition is getting read.

    Generally speaking, any custom constants or settings added to wp-config.php should appear before any require or include statements, because those are where WordPress sneaks off to load all the plugins and themes and whatnot.

    In the stock version of the config file — some hosting environments use a modified format, so yours may look different — that just means adding your custom bits before the line reading require_once ABSPATH . 'wp-settings.php';

    As for the path itself, it should be absolute, e.g. /home/$user/$website/wp-log/jeepers-peepers-wp-syslog.log, and you should create the wp-log directory manually if it doesn’t already exist.

    Did any of that help?

    • This reply was modified 1 year, 10 months ago by Blobfolio.
    Thread Starter 4p0hk

    (@4p0hk)

    Wow, that was incredibly fast. You’re correct, I was declaring the variable too late. Once I moved the declaration up further, everything worked and the log file appeared with data inside.

    Many thanks, very excited to use this plugin – great work!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to write logs’ is closed to new replies.