WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Magic Gallery] Document root can't be relied upon in virtual environments

[Plugin: Magic Gallery] Document root can't be relied upon in virtual environments

  • SeekingSerenity
    Member

    @seekingserenity

    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/

  • The topic ‘[Plugin: Magic Gallery] Document root can't be relied upon in virtual environments’ is closed to new replies.