Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#30642 closed defect (bug) (duplicate)

Infinite Loop created when $target_parent is outside of base_dir

Reported by: kanyuga's profile kanyuga Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.7
Component: Filesystem API Keywords:
Focuses: administration Cc:


We had a client who was moving from wordpress to plesk. As such his root directory changed from /home/foo/public_html/ to /var/www/vhosts/bar/. He had set his upload path to /home/foo/public_html/wp-content causing the server to throw a warning on line 1497 of wp-includes/functions.php below resulting in an infinite loop that throws up errors.

We are using PHP 5.5.9.

// We need to find the permissions of the parent folder that exists and inherit that.
$target_parent = dirname( $target );
while ( '.' != $target_parent && ! is_dir( $target_parent ) ) {
    $target_parent = dirname( $target_parent );

Change History (3)

#1 @SergeyBiryukov
9 years ago

  • Component changed from General to Filesystem API
  • Version changed from 4.0.1 to 3.7

Introduced in [25047].

#2 @JxsDotNL
8 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #30258.

#3 @netweb
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.