On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hello to all!

    A couple days ago all dynamic images on my MODx revo unexpectedly gone. (2.0.8-pl) This site have been worked fine (approx. 3-4 month).
    There is
    blank area in file browser (instead of image preview),
    nothing in tv image preview,
    blank boxes in Gallery (Extra snippet).

    Meanwhile files and its caches is exist on server and I can see it by absolute adress.
    I’ve test ImageMagick and its ok: Version: ImageMagick 6.4.9-3 2009-03-05 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
    But in core/cache/logs/error.log I’ve got an error "ImageMagick did not return recognized version string"
    Dont know is it important or not.

    Any way, I have checked file permissions of all thumb’s cache folders - 755
    Tried this one http://modxcms.com/forums/index.php/topic,63182.msg358026.html#msg358026
    And nothing.

    Don’t know what to do next. May be hosting provider updated some soft on server?
    Will be appreciative for any kind of ideas. Thanks!

    Here full chunk of error log

    [2011-06-10 09:05:10] (ERROR @ /assets/components/gallery/connector.php) Error caching action map mgr/actions
    [2011-06-10 09:19:54] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /assets/components/gallery/files/44/225.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
        [1] => setCacheDirectory() starting with config_cache_directory = "/home/host-directory/mysite.ru/docs/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
        [2] => setting config_cache_directory to realpath(/home/host-directory/mysite.ru/docs/core/cache/phpthumb) = "/home/host-directory/mysite.ru/docs/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
        [3] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/home/host-directory/mysite.ru/docs) to $filename (/assets/components/gallery/files/44/225.jpg) resulting in ($AbsoluteFilename = "/home/host-directory/mysite.ru/docs/assets/components/gallery/files/44/225.jpg") in file "phpthumb.class.php" on line 1025
        [4] => setSourceFilename(/home/host-directory/mysite.ru/docs/assets/components/gallery/files/44/225.jpg) set $this->sourceFilename to "/home/host-directory/mysite.ru/docs/assets/components/gallery/files/44/225.jpg" in file "phpthumb.class.php" on line 243
        [5] => setCacheDirectory() starting with config_cache_directory = "/home/host-directory/mysite.ru/docs/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 919
        [6] => setting config_cache_directory to realpath(/home/host-directory/mysite.ru/docs/assets/components/gallery/cache) = "/home/host-directory/mysite.ru/docs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
        [7] => setSourceFilename(/assets/components/gallery/files/44/225.jpg) set $this->sourceFilename to "/assets/components/gallery/files/44/225.jpg" in file "phpthumb.class.php" on line 243
        [8] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
        [9] =>   file_exists() = 0 in file "phpthumb.class.php" on line 1101
        [10] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
        [11] => using ImageMagick path from `which convert` (/usr/local/bin/convert) in file "phpthumb.class.php" on line 1121
        [12] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148
        [13] => ImageMagick did not return recognized version string (Version: ImageMagick 6.4.9-3 2009-03-05 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC) in file "phpthumb.class.php" on line 1154
        [14] => ImageMagick convert --version says "Unknown" in file "phpthumb.class.php" on line 1157
        [15] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
        [16] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
        [17] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902
        [18] => $this->thumbnailQuality set to "90" in file "phpthumb.class.php" on line 912
        [19] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/assets/components/gallery/files/44/225.jpg) resulting in ($AbsoluteFilename = "/assets/components/gallery/files/44/225.jpg") in file "phpthumb.class.php" on line 1022
        [20] => $this->sourceFilename set to "/assets/components/gallery/files/44/225.jpg" in file "phpthumb.class.php" on line 813
        [21] => phpThumb() v1.7.9-200712090829
    
    "/assets/components/gallery/files/44/225.jpg" does not exist in file "phpthumb.class.php" on line 3652
        [22] => setCacheDirectory() starting with config_cache_directory = "/home/host-directory/mysite.ru/docs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 919
        [23] => setting config_cache_directory to realpath(/home/host-directory/mysite.ru/docs/assets/components/gallery/cache) = "/home/host-directory/mysite.ru/docs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
        [24] => SetCacheFilename() _src set from md5($this->sourceFilename) "/assets/components/gallery/files/44/225.jpg" = "0ed2e680664f5f5878d049a11b97df51" in file "phpthumb.class.php" on line 3074
        [25] => SetCacheFilename() _par set from md5(_h600_w750_dpi150_q90) in file "phpthumb.class.php" on line 3107
        [26] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2894
        [27] => GetImageSize("/assets/components/gallery/files/44/225.jpg") failed in file "phpthumb.class.php" on line 2917
        [28] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
        [29] => phpThumb_tempnam() returning "/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb3oBzXB" in file "phpthumb.class.php" on line 3867
        [30] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
        [31] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
        [32] => GetImageSize(/assets/components/gallery/files/44/225.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1318
        [33] => GetImageSize(/assets/components/gallery/files/44/225.jpg) failed in file "phpthumb.class.php" on line 1460
        [34] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
        [35] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186
        [36] => ImageMagick called as (convert -density 150 -thumbnail 750x600 -quality 90 -interlace line  "/assets/components/gallery/files/44/225.jpg[0]" jpeg:"/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb3oBzXB" 2>&1) in file "phpthumb.class.php" on line 1826
        [37] => ImageMagick failed with message (convert: unable to open image `/assets/components/gallery/files/44/225.jpg': No such file or directory @ blob.c/OpenBlob/2427.
    convert: missing an image filename `jpeg:/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb3oBzXB' @ convert.c/ConvertImageCommand/2766.) in file "phpthumb.class.php" on line 1834
        [38] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2924
        [39] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2873
        [40] => SetOrientationDependantWidthHeight() setting w="750", h="600" in file "phpthumb.class.php" on line 2889
        [41] => exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 2971
        [42] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3234
        [43] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
        [44] => phpThumb_tempnam() returning "/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb2bVzwM" in file "phpthumb.class.php" on line 3867
        [45] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
        [46] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
        [47] => GetImageSize(/assets/components/gallery/files/44/225.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1318
        [48] => GetImageSize(/assets/components/gallery/files/44/225.jpg) failed in file "phpthumb.class.php" on line 1460
        [49] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
        [50] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186
        [51] => ImageMagick called as (convert -density 150 -thumbnail 750x600 -quality 90 -interlace line  "/assets/components/gallery/files/44/225.jpg[0]" jpeg:"/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb2bVzwM" 2>&1) in file "phpthumb.class.php" on line 1826
        [52] => ImageMagick failed with message (convert: unable to open image `/assets/components/gallery/files/44/225.jpg': No such file or directory @ blob.c/OpenBlob/2427.
    convert: missing an image filename `jpeg:/home/host-directory/mysite.ru/docs/assets/components/gallery/pThumb2bVzwM' @ convert.c/ConvertImageCommand/2766.) in file "phpthumb.class.php" on line 1834
        [53] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3283
        [54] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3335
        [55] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3337
        [56] => phpThumb() v1.7.9-200712090829
    
    Unknown image type identified by "" () in SourceImageToGD()[3449] in file "phpthumb.class.php" on line 3652
        [57] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
    )
    
    [2011-06-10 09:38:22] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 431) PHP warning: unlink(/home/host-directory/mysite.ru/docs/core/cache/objects/modTemplateVar/d2f825fe532458280e8522d112f97788.cache.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory
    [2011-06-10 09:38:22] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 439) PHP warning: closedir(): 94 is not a valid Directory resource
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 431) PHP warning: unlink(/home/host-directory/mysite.ru/docs/core/cache/objects/modTemplateVarResource/e3adaae42a2402448f72956e5c91a986.cache.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 439) PHP warning: closedir(): 626 is not a valid Directory resource
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 431) PHP warning: unlink(/home/host-directory/mysite.ru/docs/core/cache/objects/modTemplateVarResource/e3adaae42a2402448f72956e5c91a986.cache.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 439) PHP warning: closedir(): 729 is not a valid Directory resource
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 431) PHP warning: unlink(/home/host-directory/mysite.ru/docs/core/cache/objects/modTemplateVarResource/d0d8e9405375194154f72b082e089023.cache.php) [<a href='function.unlink'>function.unlink</a>]: No such file or directory
    [2011-06-10 09:38:27] (ERROR @ /home/host-directory/mysite.ru/docs/core/xpdo/cache/xpdocachemanager.class.php : 439) PHP warning: closedir(): 720 is not a valid Directory resource
    



    • I guess this is not modx problem...
      • Try going into System Settings, filter by ’phpthumb’ and change phpthumb_allow_src_above_docroot to YES.

        Change back to ’No’ if it doesn’t work.

        Also, did you try clearing your site cache and thumbnail cache too?
        • Thanks Lucas for your reply.
          But unfortunately phpthumb_allow_src_above_docroot did not help );
          Yes, I tried to clean cache.
          • If it was working up until a few days ago then stopped for no apparent reason, it sounds like your host has probably changed something. Maybe speak to them and see if they upgraded or removed any software recently... that might give you a clue
            • fyi, lucas: thanks, your solution worked for me.