WordPress.org

Ready to get started?Download WordPress

Forums

Magic Gallery
Document root can't be relied upon in virtual environments (1 post)

  1. SeekingSerenity
    Member
    Posted 2 years ago #

    In virtual hosting environments document root may not point to a valid location and/or soft links may mean that you're not in the directory you think you are. This breaks the thumbnailing code in image.php and you just end up with grey boxes where the thumbnails should be.

    I made the following change in line 156 of image.php:

    // Strip the possible trailing slash off the document root
    // WRONG $docRoot = preg_replace('/\/$/', '', DOCUMENT_ROOT);
    $docRoot = realpath(CURRENT_DIR . '/../../..');

    http://wordpress.org/extend/plugins/magic-gallery/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by SeekingSerenity
  • This topic is not resolved
  • WordPress version: 3.3.1