[wp-trac] [WordPress Trac] #36184: Eternal loop under certain conditions

WordPress Trac noreply at wordpress.org
Fri Sep 30 18:50:44 UTC 2016


#36184: Eternal loop under certain conditions
----------------------------+------------------------------
 Reporter:  Mikk3lRo        |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Filesystem API  |     Version:  4.4.2
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  performance
----------------------------+------------------------------
Changes (by robertstaddon):

 * type:  enhancement => defect (bug)


Comment:

 I am encountering the very same issue as @Mikk3lRo describes in this
 ticket. I have a WordPress install that was migrated from one server to
 another. Somewhere there is a misconfiguration in a very popular and well-
 supported plugin that is triggering an eternal loop of the wp_mkdir_p()
 function in wp-includes/functions.php.

 Though I obviously need to figure out whatever incorrect setting is
 causing this, I wholeheartedly agree that an eternal loop that writes to
 the error-log on each iteration (if open_basedir is active, possibly under
 other circumstances too) is not a very graceful way to fail. It very
 quickly fills up the hard drive and crashes the entire server.

 Here is the exact error message that appears millions of times in the
 error_log when triggered:

 {{{

 mod_fcgid: stderr: PHP Warning: is_dir(): open_basedir restriction in
 effect. File(/) is not within the allowed path(s): in /httpdocs/wp-
 includes/functions.php on line 1616

 }}}

 I will try the patch by @wgrafael and see if that solves it. It certainly
 does make a lot of sense to add an is_readable test before attempting a
 recursive function of this nature.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36184#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list