Title: mkdir_p triggering is_dir warning
Last modified: June 11, 2020

---

# mkdir_p triggering is_dir warning

 *  Resolved [WebmasterVPU](https://wordpress.org/support/users/webmastervpu/)
 * (@webmastervpu)
 * [5 years, 12 months ago](https://wordpress.org/support/topic/mkdir_p-triggering-is_dir-warning/)
 * 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](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmkdir_p-triggering-is_dir-warning%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/mkdir_p-triggering-is_dir-warning/#post-13016532)
 * 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](https://wordpress.org/support/users/webmastervpu/)
 * (@webmastervpu)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/mkdir_p-triggering-is_dir-warning/#post-13016813)
 * 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](https://wordpress.org/support/users/webmastervpu/)
 * (@webmastervpu)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/mkdir_p-triggering-is_dir-warning/#post-13016816)
 * Solved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘mkdir_p triggering is_dir warning’ is closed to new replies.

## Tags

 * [warning](https://wordpress.org/support/topic-tag/warning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [WebmasterVPU](https://wordpress.org/support/users/webmastervpu/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/mkdir_p-triggering-is_dir-warning/#post-13016816)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
