• Resolved WebmasterVPU

    (@webmastervpu)


    On all my sites where I have WP Activity Log installed, the function mkdir_p generates a warning due to the final “/” when recursing the log file location.
    This warning shows when logged in and it also shows with all the REST APIs, leading to broken JSON.

    Here the error message:
    Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/.sites/40/site933/web:/home/.sites/40/site933/tmp:/usr/share/pear:/usr/bin/php_safemode) in /home/.sites/40/site933/web/wp/wp-includes/functions.php on line 1974

    I temporarily fixed it by adding a while clause to skip also “/” (like “.”).

    Not sure whether that’s a webspace setting, a plugin issue or just a combination.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Something is misusing wp_mkdir_p() if the path/file / is being used in is_dir(). So likely a plugin. It’s normal for open_basesir setting to not allow /. The plugin doing this needs some modification. I think you know that modifying functions.php is not a valid fix.

    Thread Starter WebmasterVPU

    (@webmastervpu)

    Thanks for the answer.
    I have also connected with the plugin owner and they are working on a fix.
    And yes, I am aware that modifying functions.php is not a sustainable solution. Though, does the trick until the plugin is fixed.

    Thread Starter WebmasterVPU

    (@webmastervpu)

    Solved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘mkdir_p triggering is_dir warning’ is closed to new replies.