We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46162
    • 4 Posts
    Hi all,
    i can't seem to get phpthumbof working on my server. I installed Imagemagick and PHP GD. All my directories are writeable as they should.
    Here is my log:


     [2014-01-02 13:19:56] (DEBUG @ /index.php) 
    <br />Execution time: 0.0001 s
    <br />
    [2014-01-02 13:19:56] (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: assets/img/image.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.11-201108081537 in file "phpthumb.class.php" on line 216
        [1] => setCacheDirectory() starting with config_cache_directory = "/var/www/core/cache/phpthumb/" in file "phpthumb.class.php" on line 958
        [2] => setting config_cache_directory to realpath(/var/www/core/cache/phpthumb) = "/var/www/core/cache/phpthumb" in file "phpthumb.class.php" on line 986
        [3] => setCacheDirectory() starting with config_cache_directory = "/var/www/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 958
        [4] => setting config_cache_directory to realpath(/var/www/assets/components/phpthumbof/cache) = "/var/www/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 986
        [5] => setSourceFilename(assets/img/image.jpg) set $this->sourceFilename to "assets/img/image.jpg" in file "phpthumb.class.php" on line 262
        [6] => CleanUpCacheDirectory() set to purge (30.0 days; 100.00 MB; 10,000 files) in file "phpthumb.class.php" on line 673
        [7] => CleanUpCacheDirectory() skipped because "/var/www/assets/components/phpthumbof/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 683
        [8] =>                   file_exists() = 0 in file "phpthumb.class.php" on line 1165
        [9] => file_exists_ignoreopenbasedir() = 0 in file "phpthumb.class.php" on line 1166
        [10] =>                       is_file() = 0 in file "phpthumb.class.php" on line 1167
        [11] =>                 is_executable() = 0 in file "phpthumb.class.php" on line 1168
        [12] => ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned () in file "phpthumb.class.php" on line 1198
        [13] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
        [14] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
        [15] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 941
        [16] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 951
        [17] => $this->sourceFilename set to "/var/www/core/model/phpthumb/assets/img/image.jpg" in file "phpthumb.class.php" on line 852
        [18] => phpThumb() v1.7.11-201108081537
    http://phpthumb.sourceforge.net
    
    Error messages disabled in file "phpthumb.class.php" on line 3845
        [19] => setCacheDirectory() starting with config_cache_directory = "/var/www/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 958
        [20] => setting config_cache_directory to realpath(/var/www/assets/components/phpthumbof/cache) = "/var/www/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 986
        [21] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/core/model/phpthumb/assets/img/image.jpg" = "c551c5b6cbf783f74d398e65b1c6b13b" in file "phpthumb.class.php" on line 3238
        [22] => SetCacheFilename() _par set from md5(_farC_zc1_h80_w80_dpi150_q75) in file "phpthumb.class.php" on line 3271
        [23] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3033
        [24] => GetImageSize(/var/www/core/model/phpthumb/assets/img/image.jpg) says image is x in file "phpthumb.class.php" on line 3043
        [25] => GetImageSize("/var/www/core/model/phpthumb/assets/img/image.jpg") failed in file "phpthumb.class.php" on line 3076
        [26] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
        [27] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 2006
        [28] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3083
        [29] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3012
        [30] => SetOrientationDependantWidthHeight() setting w="80", h="80" in file "phpthumb.class.php" on line 3028
        [31] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3140
        [32] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3398
        [33] => starting ImageCreateFromFilename(/var/www/core/model/phpthumb/assets/img/image.jpg) in file "phpthumb.class.php" on line 3313
        [34] => empty $filename or GetImageSize(/var/www/core/model/phpthumb/assets/img/image.jpg) failed in file "phpthumb.class.php" on line 3362
        [35] => Populating $rawimagedata in file "phpthumb.class.php" on line 3370
        [36] => cannot fopen(/var/www/core/model/phpthumb/assets/img/image.jpg) in file "phpthumb.class.php" on line 3381
        [37] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3469
        [38] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3521
        [39] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3523
        [40] => phpThumb() v1.7.11-201108081537
    http://phpthumb.sourceforge.net
    
    Error messages disabled in file "phpthumb.class.php" on line 3845
        [41] => SourceImageToGD() failed in file "phpthumb.class.php" on line 342
    )
    
    


    Please help me. I'm running MODx 2.3.0-dev (git)
      • 38290
      • 712 Posts
      Have you done any of the tests that come with ImageMagick or PHP GD? That will help narrow down if the issue is MODX or server related.
        jpdevries
        • 14214
        • 299 Posts
        Run some of the examples from the ImageMagic site outside of MODx. Ensure that is it not a server issue. Generally I have not had issues with MODx and phpThumb, it has always been a server issue.
          • 46162
          • 4 Posts
          I did not manage to find a solution. Ran some tests, everything was installed and functioning. Decided to switch hosts and my new host doesn't have this problem. Thanks.
            • 14214
            • 299 Posts
            Guess there is more than one way to skin a cat.

            If you get a bug turn on error reporting to see where the catch is. There are a lot of very smart people in these forums willing to help.
              • 38290
              • 712 Posts
              Oh good. Could you confirm the host environment you were experiencing the issue on?
                jpdevries
                • 46162
                • 4 Posts
                It was a digitalocean droplet running Ubuntu server 13.10 with apache2 and php 5.5
                  • 21508
                  • 46 Posts
                  I replaced the file with a previous version phpthumb.class.php MODx 2.2.10 and it worked
                    It’s Nice to Be Important, But It’s More Important to Be Nice
                    • 41049
                    • 35 Posts
                    Where can i get this phpthumb.class.php MODx 2.2.10 ?

                    thanks!
                    • I was having a problem getting phpthumbof and phpthumbsup to work, so I tried pthumb and it works perfectly. I guess it depends on your server and MODX configuration.
                        Studying MODX in the desert - http://sottwell.com
                        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                        Join the Slack Community - http://modx.org