We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49577
    • 12 Posts
    Hi Guys,

    I am trying to parse an imatge through phpthumbof so the image will be resized to the correct size for am image gallery.

    I am getting this error in my logs... Not sure how to troubleshoot this issue, Do I need to install and enable ImageMagick or does the modx package handle this for me?

    Log Below:

     [2015-03-01 18:00:44] (ERROR @ /modx/index.php) [phpThumbOf] Could not generate thumbnail: css/images/g1.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
        [1] => setCacheDirectory() starting with config_cache_directory = "C:/htdocs/modx/core/cache/phpthumb/" in file "phpthumb.class.php" on line 961
        [2] => setting config_cache_directory to realpath(C:\htdocs\modx\core\cache\phpthumb) = "C:\htdocs\modx\core\cache\phpthumb" in file "phpthumb.class.php" on line 989
        [3] => setCacheDirectory() starting with config_cache_directory = "C:/htdocs/modx/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 961
        [4] => setting config_cache_directory to realpath(C:\htdocs\modx\assets\components\phpthumbof\cache) = "C:\htdocs\modx\assets\components\phpthumbof\cache" in file "phpthumb.class.php" on line 989
        [5] => setSourceFilename(css/images/g1.jpg) set $this->sourceFilename to "css/images/g1.jpg" in file "phpthumb.class.php" on line 271
        [6] => CleanUpCacheDirectory() set to purge (30.0 days; 100.00 MB; 10,000 files) in file "phpthumb.class.php" on line 667
        [7] => CleanUpCacheDirectory() skipped because $CacheDirOldFilesSize is empty (phpthumb_functions::GetAllFilesInSubfolders(C:\htdocs\modx\assets\components\phpthumbof\cache) found no files) in file "phpthumb.class.php" on line 700
        [8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
        [9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
        [10] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
        [11] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 953
        [12] => $this->sourceFilename set to "C:/htdocs/modx//modx/css/images/g1.jpg" in file "phpthumb.class.php" on line 849
        [13] => phpThumb() v1.7.13-201406261000
    http://phpthumb.sourceforge.net
    
    Error messages disabled.
    
    edit phpThumb.config.php and (temporarily) set
    $PHPTHUMB_CONFIG['disable_debug'] = false;
    to view the details of this error in file "phpthumb.class.php" on line 4050
        [14] => SetCacheFilename() _src set from md5($this->sourceFilename) "C:/htdocs/modx//modx/css/images/g1.jpg" = "e72918837668e1cb1187237024a819ce" in file "phpthumb.class.php" on line 3443
        [15] => SetCacheFilename() _par set from md5(_farC_h95_w127_dpi150_q75) in file "phpthumb.class.php" on line 3476
        [16] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
        [17] => GetImageSize(C:/htdocs/modx//modx/css/images/g1.jpg) says image is x in file "phpthumb.class.php" on line 3246
        [18] => GetImageSize("C:/htdocs/modx//modx/css/images/g1.jpg") failed in file "phpthumb.class.php" on line 3279
        [19] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
        [20] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 2203
        [21] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
        [22] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
        [23] => SetOrientationDependantWidthHeight() setting w="127", h="95" in file "phpthumb.class.php" on line 3231
        [24] => exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 3339
        [25] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
        [26] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
        [27] => starting ImageCreateFromFilename(C:/htdocs/modx//modx/css/images/g1.jpg) in file "phpthumb.class.php" on line 3518
        [28] => empty $filename or GetImageSize(C:/htdocs/modx//modx/css/images/g1.jpg) failed in file "phpthumb.class.php" on line 3567
        [29] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
        [30] => cannot fopen(C:/htdocs/modx//modx/css/images/g1.jpg) in file "phpthumb.class.php" on line 3586
        [31] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
        [32] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
        [33] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
        [34] => phpThumb() v1.7.13-201406261000
    http://phpthumb.sourceforge.net
    
    Error messages disabled.
    
    edit phpThumb.config.php and (temporarily) set
    $PHPTHUMB_CONFIG['disable_debug'] = false;
    to view the details of this error in file "phpthumb.class.php" on line 4050
        [35] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
    )

    This question has been answered by AMDbuilder. See the first response.

    [ed. note: bonkas last edited this post 11 years, 7 months ago.]
      • 49577
      • 12 Posts
      Nobody has any ideas?

      All I have managed to come up with is this similar issue: https://forums.modx.com/thread/87742/gallery-phpthumbof-could-not-generate-thumbnail

      I cannot find the option in the very last post that is supposed to resolve this in my modx installation.

      Is there another way I can accomplish this? Basically all I am wanting to do is add and manage images in the back-end which are dynamically update in the image galleries and sliders throughout the site. At the moment I am using migx to create the custom TV where I can add my images, add descriptions etc and using the migx code to dispay the images on the page. [ed. note: bonkas last edited this post 11 years, 7 months ago.]
      • discuss.answer
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Hello,

        Can you tell us more about your hosting environment? Also are you using pThumb (recommended) or phpthumbof (depreciated).

        In regards to ImageMagick your provider would need to install that for you, unless you have root access to the server.
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 49577
          • 12 Posts
          Quote from: AMDbuilder at Mar 03, 2015, 05:20 PM
          Also are you using pThumb (recommended) or phpthumbof (depreciated).

          This may have just answered my question. I am using phpthumbof, maybe I should give pThumb a go.

          I am hosting modx on Apache 2.2 with PHP 5.4 with GD Enabled on my own Server 2008 R2.

          Modx is installed not in the root but in a folder "modx" which resides in the root.

          I had a heck of a time installing ImageMagick and subsequently gave up when my google fu just came up with others in the same boat as me.

          EDIT: Replacing phpthumbof with pThumb has resolved it! [ed. note: bonkas last edited this post 11 years, 7 months ago.]
            • 1343 ☆ A M B ☆
            • 2,213 Posts
            I'm glad to hear that resolved the problem, thanks for posting back!
              Patrick | Server Wrangler
              About Me: Website | Tweets |  MODX Hosting