We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7604
    • 4 Posts
    So I have been trying to run this down but my setup is pretty unique so all of the other solutions I have tried from other threads aren't working.
    I am running Revo 2.2.8
    Thumbnails work under the main filesystem media source fine
    Thumbnails do not work under the separate media source I have setup for each context.
    I am getting this error in the log.
    [2013-10-24 12:53:01] (ERROR @ /connectors/system/phpthumb.php) phpThumb was unable to generate a thumbnail for: /home/~username/public_html/core/cache/phpthumb/phpThumb_cache_dev1.domain.com_srcf7b37836b47fca3b329cbb5401899fa6_par02a1b054e8467fb1e234c8a8fd8d10d2_dat0.png
    [2013-10-24 12:53:01] (ERROR @ /connectors/system/phpthumb.php) Error outputting thumbnail:
    OutputThumbnail() failed because !is_resource($this->gdimg_output) in file "phpthumb.class.php" on line 557
    

    I opened firebug and looked at the source of the thumbnail. And it looks like it is looking for the image in site root because it only is looking for
    src=image.png


    I tried to set the phpthmb_document_root which seems to provide a more promising error message in the log
        [40] => GetImageSize(/home/~user/public_html/image.PNG) FAILED with error "<br />
    <b>Warning</b>:  getimagesize(/home/~user/public_html/image.PNG): failed to open stream: No such file or directory in <b>/home/~user/public_html/core/model/phpthumb/phpthumb.class.php</b> on line <b>1312</b><br />
    " in file "phpthumb.class.php" on line 1318
    

    This is much closer but since the image is in a sub-directory 3 levels deeper it didn't work as well.

    So I tried to set phpthmb_document_root on the context level with no luck. It just went back to the previous error.

    To me it looks like I need to set the phpthmb_document_root on the context or media source level but didn't have any luck trying to do that.

    If someone could help that would be awesome. Thank you!
      • 42154
      • 5 Posts
      I have just had the same issue, I'm not working with the main site I'm using a temp site before I transfer the domain over, and the site name is prefixed with one of these; '~' I just did a search and came up with this;

      https://forums.modx.com/thread/70829/resources-browser-not-showing-images-thumbnails

      The suggestion from the Skytoaster guy worked for me, go to settings/ core/ PHP Thumb then alter the following setting from no to yes;


      phpThumb Allow src Above Document Root phpthumb_allow_src_above_docroot Yes


      It just worked for me, good luck.
        • 7604
        • 4 Posts
        I appreciate the response.
        I have tried that as well previously, but no luck.

        My next step is to try passing a context setting into the main phpthmb_document_root since that seemed to get me 50% of the way with just setting it directly.

        Not sure if that is possible so I am going to see what steps I can take to make that happen.

        If that works I will pass it on in this thread.