We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44588
    • 8 Posts
    Gallery extension doesn't generate thumbnails. It's not working as well as in frontend and backend. But in file browser thumbnails are generated properly. So it's look like problem is in gallery extension or it's settings.
    I have read that this ("gallery.thumbs_prepend_site_url" - on) may affect so I have tried it and have no results. Also there was mentioning about Imagemagic, and paths to phpthumb e.t.c. I have checked all this. And I think if there was something wrong, thumbnails would not be generated everywhere but they doesn't work only in gallery.

    This is the Error Log I get:
     [2013-10-05 20:48:21] (DEBUG @ /assets/components/gallery/connector.php) 
    <br />Execution time: 0.0001 s
    <br />
    [2013-10-05 20:48:21] (DEBUG @ /assets/components/gallery/connector.php) 
    <br />Execution time: 0.0002 s
    <br />
    [2013-10-05 20:48:21] (DEBUG @ /assets/components/gallery/connector.php) 
    <br />Execution time: 0.0001 s
    <br />
    [2013-10-05 20:48:22] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: http://www.arciel.ru/assets/gallery/1/3.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
        [1] => setCacheDirectory() starting with config_cache_directory = "/wrk/www/htdocs/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
        [2] => setting config_cache_directory to realpath(/wrk/www/htdocs/core/cache/phpthumb) = "/wrk/www/htdocs/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
        [3] => setSourceFilename(http://www.arciel.ru/assets/gallery/1/3.jpg) set $this->sourceFilename to "http://www.arciel.ru/assets/gallery/1/3.jpg" in file "phpthumb.class.php" on line 243
        [4] => setCacheDirectory() starting with config_cache_directory = "/wrk/www/htdocs/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 919
        [5] => setting config_cache_directory to realpath(/wrk/www/htdocs/assets/components/gallery/cache) = "/wrk/www/htdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
        [6] => setSourceFilename(http://www.arciel.ru/assets/gallery/1/3.jpg) set $this->sourceFilename to "http://www.arciel.ru/assets/gallery/1/3.jpg" in file "phpthumb.class.php" on line 243
        [7] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
        [8] =>   file_exists() = 0 in file "phpthumb.class.php" on line 1101
        [9] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
        [10] => using ImageMagick path from `which convert` (/usr/local/bin/convert) in file "phpthumb.class.php" on line 1121
        [11] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148
        [12] => ImageMagick did not return recognized version string (Version: ImageMagick 6.8.0-7 2013-10-02 Q16 http://www.imagemagick.org
    Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
    Features:) in file "phpthumb.class.php" on line 1154
        [13] => ImageMagick convert --version says "Unknown" in file "phpthumb.class.php" on line 1157
        [14] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png) in file "phpthumb.class.php" on line 884
        [15] => $this->thumbnailFormat staying as "png" because $this->config_output_format (jpeg) is not in $AvailableImageOutputFormats in file "phpthumb.class.php" on line 898
        [16] => $this->thumbnailFormat staying as "png" because $this->f (jpeg) is not in $AvailableImageOutputFormats in file "phpthumb.class.php" on line 905
        [17] => $this->thumbnailQuality set to "90" in file "phpthumb.class.php" on line 912
        [18] => $this->sourceFilename set to "http://www.arciel.ru/assets/gallery/1/3.jpg" in file "phpthumb.class.php" on line 813
        [19] => setCacheDirectory() starting with config_cache_directory = "/wrk/www/htdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 919
        [20] => setting config_cache_directory to realpath(/wrk/www/htdocs/assets/components/gallery/cache) = "/wrk/www/htdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
        [21] => SetCacheFilename() _src set from md5($this->sourceFilename) "http://www.arciel.ru/assets/gallery/1/3.jpg" = "5983afc737a7024e662c0c5d962919c0" in file "phpthumb.class.php" on line 3077
        [22] => SetCacheFilename() _par set from md5(_farC_zc1_h75_w75_dpi150) in file "phpthumb.class.php" on line 3110
        [23] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
        [24] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
        [25] => phpThumb_tempnam() returning "/wrk/www/htdocs/assets/components/gallery/pThumb2noau3" in file "phpthumb.class.php" on line 3861
        [26] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
        [27] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
        [28] => GetImageSize(http://www.arciel.ru/assets/gallery/1/3.jpg) SUCCEEDED: a:7:{i:0;i:1280;i:1;i:720;i:2;i:2;i:3;s:25:"width="1280" height="720"";s:4:"bits";i:8;s:8:"channels";i:3;s:4:"mime";s:10:"image/jpeg";} in file "phpthumb.class.php" on line 1316
        [29] => GetImageSize(http://www.arciel.ru/assets/gallery/1/3.jpg) returned [w=1280;h=720;f=2] in file "phpthumb.class.php" on line 1321
        [30] => source dimensions set to 1280x720 in file "phpthumb.class.php" on line 1324
        [31] => SetOrientationDependantWidthHeight() starting with "1280"x"720" in file "phpthumb.class.php" on line 2876
        [32] => SetOrientationDependantWidthHeight() setting w="75", h="75" in file "phpthumb.class.php" on line 2892
        [33] => ImageMagickSwitchAvailable(repage) = 1 in file "phpthumb.class.php" on line 1189
        [34] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
        [35] => ImageMagick called as (convert -density 150 -thumbnail x75 -gravity center -crop 75x75+0+0 +repage "http://www.arciel.ru/assets/gallery/1/3.jpg[0]" png:"/wrk/www/htdocs/assets/components/gallery/pThumb2noau3" 2>&1) in file "phpthumb.class.php" on line 1826
        [36] => ImageMagick failed with message (unknown: unable to access configure file `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
    unknown: unable to open image `//www.arciel.ru/assets/gallery/1/3.jpg': No such file or directory @ error/blob.c/OpenBlob/2638.
    unknown: no images defined `png:/wrk/www/htdocs/assets/components/gallery/pThumb2noau3' @ error/convert.c/ConvertImageCommand/3078.) in file "phpthumb.class.php" on line 1834
        [37] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
        [38] => SetOrientationDependantWidthHeight() starting with "1280"x"720" in file "phpthumb.class.php" on line 2876
        [39] => SetOrientationDependantWidthHeight() setting w="75", h="75" in file "phpthumb.class.php" on line 2892
        [40] => exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 2974
        [41] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
        [42] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
        [43] => phpThumb_tempnam() returning "/wrk/www/htdocs/assets/components/gallery/pThumbDiVy0z" in file "phpthumb.class.php" on line 3861
        [44] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
        [45] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
        [46] => GetImageSize(http://www.arciel.ru/assets/gallery/1/3.jpg) SUCCEEDED: a:7:{i:0;i:1280;i:1;i:720;i:2;i:2;i:3;s:25:"width="1280" height="720"";s:4:"bits";i:8;s:8:"channels";i:3;s:4:"mime";s:10:"image/jpeg";} in file "phpthumb.class.php" on line 1316
        [47] => GetImageSize(http://www.arciel.ru/assets/gallery/1/3.jpg) returned [w=1280;h=720;f=2] in file "phpthumb.class.php" on line 1321
        [48] => source dimensions set to 1280x720 in file "phpthumb.class.php" on line 1324
        [49] => SetOrientationDependantWidthHeight() starting with "1280"x"720" in file "phpthumb.class.php" on line 2876
        [50] => SetOrientationDependantWidthHeight() setting w="75", h="75" in file "phpthumb.class.php" on line 2892
        [51] => ImageMagickSwitchAvailable(repage) = 1 in file "phpthumb.class.php" on line 1189
        [52] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
        [53] => ImageMagick called as (convert -density 150 -thumbnail x75 -gravity center -crop 75x75+0+0 +repage "http://www.arciel.ru/assets/gallery/1/3.jpg[0]" png:"/wrk/www/htdocs/assets/components/gallery/pThumbDiVy0z" 2>&1) in file "phpthumb.class.php" on line 1826
        [54] => ImageMagick failed with message (unknown: unable to access configure file `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
    unknown: unable to open image `//www.arciel.ru/assets/gallery/1/3.jpg': No such file or directory @ error/blob.c/OpenBlob/2638.
    unknown: no images defined `png:/wrk/www/htdocs/assets/components/gallery/pThumbDiVy0z' @ error/convert.c/ConvertImageCommand/3078.) in file "phpthumb.class.php" on line 1834
        [55] => starting ImageCreateFromFilename(http://www.arciel.ru/assets/gallery/1/3.jpg) in file "phpthumb.class.php" on line 3152
        [56] => ImageCreateFromFilename found ($getimagesizeinfo[2]==2) in file "phpthumb.class.php" on line 3161
        [57] => NOT calling ImageCreateFromJPEG(http://www.arciel.ru/assets/gallery/1/3.jpg) because !function_exists(ImageCreateFromJPEG) in file "phpthumb.class.php" on line 3173
        [58] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209
        [59] => attempting ImageCreateFromStringReplacement($rawimagedata (117705 bytes), true) in file "phpthumb.class.php" on line 3215
        [60] => ImageCreateFromStringReplacement() calling built-in ImageCreateFromString() in file "phpthumb.class.php" on line 3755
        [61] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278
        [62] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330
        [63] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332
        [64] => phpThumb() v1.7.9-200712090829
    
    All attempts to create GD image source failed.
    ImageMagick failed with message (unknown: unable to access configure file `delegates.xml' @ warning/configure.c/GetConfigureOptions/591.
    unknown: unable to open image `//www.arciel.ru/assets/gallery/1/3.jpg': No such file or directory @ error/blob.c/OpenBlob/2638.
    unknown: no images defined `png:/wrk/www/htdocs/assets/components/gallery/pThumb2noau3' @ error/convert.c/ConvertImageCommand/3078.)
    ImageMagick is not installed (it is highly recommended that you install it).
    GD does not have read support for "Content-Type: image/jpeg". in file "phpthumb.class.php" on line 3647
        [65] => phpThumb() v1.7.9-200712090829
    
    Image is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting in file "phpthumb.class.php" on line 3647
        [66] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
    )


    Also, this is the image src for thumbnail in file browser, thats work properly:
    /connectors/system/phpthumb.php?src=assets%2Fgallery%2F1%2F1.jpg&w=100&h=80&f=png&q=90&far=1&HTTP_MODAUTH=modx51d5a65f171cb7.38755985_1524ee3c0560159.25724693&wctx=mgr&source=1

    And this is the image src for thumbnail in gallery, thats doesn't work:
    /assets/components/gallery/connector.php?action=web/phpthumb&w=75&h=75&zc=1&far=C&q=90&src=http%3A%2F%2Fwww.arciel.ru%2Fassets%2Fgallery%2F1%2F1.jpg
    [ed. note: demnus last edited this post 13 years ago.]
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      It looks like the problem might be related to your hosting based on some of the error messages.

      All attempts to create GD image source failed.
      ImageMagick failed with message (.... unknown: unable to open image `//www.arciel.ru/assets/gallery/1/3.jpg': No such file or directory...)
      ImageMagick is not installed (it is highly recommended that you install it).
      GD does not have read support for "Content-Type: image/jpeg" 
      Image is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting in file 


      In short the server is unable to use GD due to memory limits, GD is configured wrong or out of date, and ImageMagick isn't installed. It's also worth noting that non-prefixed urls can also cause problems so you might want to add that as well.

      Could you tell us more about your hosting?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 44588
        • 8 Posts
        Thanks for reply.
        Before posting this I had problems with phpthumb on my site everywhere, but I have talked to my hosting provider about the issue, and they did something on their side. So, after that thumbnails start to work on main part of the site normally except for gallery.
        But before they did, whatever they did, they claimed that GD and imagemagick is installed and everything is fine. I have been able to verify what they said by using phpinfo. And everything was looking normal. Memory limit was 120MB. GD was installed as well as all other extensions that's was needed for MODX. Also I have found convert utility in standard folders. But still they done something and thumbs on site start to work. But not in Gallery.

        Actually now problem is already solved, at least it's looks like that.
        I have disabled "gallery.thumbs_prepend_site_url" and this solved the issue for me and for now. Thou I wonder, if its related to some other settings I've done for phpthumb section and what problems it may cause in future.