Awake WPMU Issues: Galleria & FancyImages Not Working

resolved (11 posts) (2 voices)

  1. EntrepreNerd
    Member

    I figured I would start a new post about this issue, despite the fact that there is another post related to it here: http://goo.gl/1D7zm

    The Site URL: http://kindledlearning.com/sample/
    Image of Error: http://goo.gl/H6LgD

    The issue seems to be with the thumb.php file. I assume this is caused by the fact that WPMU creates a locked down file structure for all sub sites which means we can not change the file permissions to 777 for the cache folder.

    So, is there some way to ensure that certain folders are auto assigned 777 on creation? Perhaps through the .htaccess file?

    Posted 1 year ago #
  2. Elliott
    Support

    Hello EntrepreNerd,

    It works fine after you change the permissions to 777 correct? I am not sure of a way to automatically change permissions after a directory is created. Your hosting provider might know of a solution here.

    I'll PM some of our other WPMU customers to see if they have ran into this problem.

    Posted 1 year ago #
  3. EntrepreNerd
    Member

    No, it does not work right now as you can see by going to http://kindledlearning.com/sample/

    I read up on some TimThumb (thumb.php) issues that had nothing to do with Awake, and it seems it is a rather common issue. They suggested the 777 settings. The trouble is that I do not know how to get access to any site in the blog.dir folder, because it is empty when I check it via FTP.

    Did user Colorit ever get his issue resolved? And if so, how? I am referring to this: http://goo.gl/1D7zm

    Also, I am using the directory option for my site (mysite.com/subsite) instead of the subdomain option (subsite.mysite.com). Could that be the issue?

    Posted 1 year ago #
  4. Elliott
    Support

    Colorit's issue was that he did not have sufficient permissions.

    If you haven't done so already then locate the following and make sure they have 777 permissions..

    /wp-content/themes/awake/lib/scripts/cache/
    /wp-content/themes/awake/lib/scripts/thumb.php

    Let us know if this works.

    Posted 1 year ago #
  5. EntrepreNerd
    Member

    I think I will scrub the entire install and start over from scratch. I will double check the permissions after the new install and update this post once I am done.

    Posted 1 year ago #
  6. EntrepreNerd
    Member

    Even after a clean install I still have the same issue.

    I tracked the URL of the error and also noticed that is we break the URL down some of it works. I will show you what I mean and perhaps you can figure out the issue. By the way, if you want FTP access or even server access to try a clean install just let me know.

    NOT WORKING - http://kindledlearning.com/sample/wp-content/themes/awake/lib/scripts/thumb.php?src=http://kindledlearning.com/sample/wp-content/themes/awake/styles/_shared/sliders/default_floating_slide.jpg&w=900&h=350&zc=1&q=100
    WORKS - http://kindledlearning.com/sample/wp-content/themes/awake/lib/scripts/thumb.php (You will see an error, but that is just thumb.php needing an image to function)
    WORKS - http://kindledlearning.com/sample/wp-content/themes/awake/lib/scripts/thumb.php?src=http://kindledlearning.com/wp-content/themes/awake/styles/_shared/sliders/default_floating_slide.jpg&w=900&h=350&zc=1&q=100 (This one works because I removed the /sample from the url.)

    So it seems that both the images and thumb.php files work on there own, but when you combine them we get errors.

    I have set everything to 777 that needs it. One thing I am not clear on when it comes to WPMU is how you go about accessing files that are locating in KindledLearning.com/Sample/ I assume each sub site uses the primary installs files, but I am not at all clear on how the WPMU file structure works. I also contact RackSpace to ensure all the settings are correct on there end.

    Posted 1 year ago #
  7. Elliott
    Support

    Go ahead and PM us WP login and FTP details so we can take a closer look EntrepreNerd.

    Posted 1 year ago #
  8. EntrepreNerd
    Member

    Thanks. The info has been sent.

    Posted 1 year ago #
  9. Elliott
    Support

    Alrighty, let us know if it works for you now EntrepreNerd.

    Posted 1 year ago #
  10. EntrepreNerd
    Member

    GOT IT FIXED!

    The issue is that TimThumb.php (thumb.php) views the WPMU virtual directories as a physical location. This means TimThumb.php will strip the domain name from a file if the file is from the same site that it is hosted on. For example, it sees "http://sample.com/sub/files/image.jpg" as "/sub/files/image.jpg", so when it tried to grab the image it can not find it die to the fact that the folder structure "/sub/files/image.jpg" does not exist on the server.

    So, all you have to do is force TimThumb.php to keep the full domain name in the images.

    HERE IS HOW
    --------------------------------------------------------------------------------------------------------
    Open TimThumb.php (thumb.php) and edit the following code.
    --------------------------------------------------------------------------------------------------------
    Starting at Line 554
    --------------------------------------------------------------------------------------------------------

    function checkExternal ($src) {
    $allowedSites = array(
    'flickr.com',
    'picasa.com',
    'blogger.com',
    'wordpress.com',
    'img.youtube.com',
    'AddYourSiteURLHere.com', **Add your domain name to this list**
    );

    --------------------------------------------------------------------------------------------------------
    Then go to line 645 and comment out the code so it looks like this.
    --------------------------------------------------------------------------------------------------------

    function cleanSource($src) {

    // $host = str_replace('www.', '', $_SERVER['HTTP_HOST']);
    // $regex = "/^((ht|f)tp(s|):\/\/)(www\.|)" . $host . "/i";

    // $src = preg_replace ($regex, '', $src);
    // $src = strip_tags ($src);
    $src = checkExternal ($src);

    // remove slash from start of string
    if (strpos($src, '/') === 0) {
    $src = substr ($src, -(strlen($src) - 1));
    }

    // don't allow users the ability to use '../'
    // in order to gain access to files below document root
    $src = preg_replace("/\.\.+\//", "", $src);

    // get path to image on file system
    $src = get_document_root($src) . '/' . $src;

    return $src;

    }
    --------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------

    That should be it. I hope this helps some one else.

    To the Awake Crew. Thanks a ton for all the help and I hope this info helps you in the future. From what I am seeing online this issue with TimThumb is very common with the new integrated version of WPMU found in WordPress 3.x. You may want to consider making the change a permanent fix in your themes.

    Posted 1 year ago #
  11. Elliott
    Support

    Hmm, I never considered editing the thumb.php file directly. I'll favorite this topic and add it to the tutorials section. Thanks very much for posting your solution EntrepreNerd.

    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme