We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • There were issues with phpthumb in 2.2.11. What version of Revo are you currently running the phpThumb issue was resolved in 2.2.12. There is a security vulnerability in the version of phpthumb.class.php that shipped with revo prior to 2.2.11. As @sottwell mentions, pthumb is a nice drop-in replacement for phpThumbOf.
      Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
      • 41049
      • 35 Posts
      I am using 2.2.14. and i still get nothing. I tried pthumb and nothing..

      error log puts out this:

      (ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: batic/artisan_wine_batic_rose.jpg - Debug: Array
      (
          [0] => phpThumb() v1.7.11-201108081537 in file "phpthumb.class.php" on line 216
          [1] => setCacheDirectory() starting with config_cache_directory = "/home/artisant/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 958
          [2] => setting config_cache_directory to realpath(/home/artisant/public_html/core/cache/phpthumb) = "/home/artisant/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 986
          [3] => setCacheDirectory() starting with config_cache_directory = "/home/artisant/public_html/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 958
          [4] => setting config_cache_directory to realpath(/home/artisant/public_html/assets/components/phpthumbof/cache) = "/home/artisant/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 986
          [5] => setSourceFilename(batic/artisan_wine_batic_rose.jpg) set $this->sourceFilename to "batic/artisan_wine_batic_rose.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 "/home/artisant/public_html/assets/components/phpthumbof/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 683
          [8] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
          [9] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
          [10] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 941
          [11] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 951
          [12] => $this->sourceFilename set to "/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg" in file "phpthumb.class.php" on line 852
          [13] => phpThumb() v1.7.11-201108081537
      http://phpthumb.sourceforge.net
      
      Error messages disabled in file "phpthumb.class.php" on line 3845
          [14] => setCacheDirectory() starting with config_cache_directory = "/home/artisant/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 958
          [15] => setting config_cache_directory to realpath(/home/artisant/public_html/assets/components/phpthumbof/cache) = "/home/artisant/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 986
          [16] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg" = "0157ea3e0df593ea4dbfb8c511923270" in file "phpthumb.class.php" on line 3238
          [17] => SetCacheFilename() _par set from md5(_farC_zc1_h314_w263_dpi150_q75) in file "phpthumb.class.php" on line 3271
          [18] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3033
          [19] => GetImageSize(/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg) says image is x in file "phpthumb.class.php" on line 3043
          [20] => GetImageSize("/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg") failed in file "phpthumb.class.php" on line 3076
          [21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
          [22] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 2006
          [23] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3083
          [24] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3012
          [25] => SetOrientationDependantWidthHeight() setting w="263", h="314" in file "phpthumb.class.php" on line 3028
          [26] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3140
          [27] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3398
          [28] => starting ImageCreateFromFilename(/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg) in file "phpthumb.class.php" on line 3313
          [29] => empty $filename or GetImageSize(/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg) failed in file "phpthumb.class.php" on line 3362
          [30] => Populating $rawimagedata in file "phpthumb.class.php" on line 3370
          [31] => cannot fopen(/home/artisant/public_html/batic/artisan_wine_batic_rose.jpg) in file "phpthumb.class.php" on line 3381
          [32] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3469
          [33] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3521
          [34] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3523
          [35] => phpThumb() v1.7.11-201108081537
      http://phpthumb.sourceforge.net
      
      Error messages disabled in file "phpthumb.class.php" on line 3845
          [36] => SourceImageToGD() failed in file "phpthumb.class.php" on line 342
      )
        • 41049
        • 35 Posts
        If using pthumb i get this error

         [2014-06-24 08:02:03] (ERROR @ /index.php) [pThumb] Resource: 2 || Image: (none)
        File not found: /home/artisant/public_html/batic/artisan_wine_batic_pinela.jpg  *** Skipping ***
        [2014-06-24 08:02:03] (ERROR @ /index.php) [pThumb] Resource: 2 || Image: (none)
        File not found: /home/artisant/public_html/batic/artisan_wine_batic_pinela.jpg  *** Skipping ***
        [2014-06-24 08:02:03] (ERROR @ /index.php) [pThumb] Resource: 2 || Image: (none)


        my call is:
        <img src="[[++assets_url]]images/products/[[+catalogue_product_image:phpthumbof=`w=234&h=123&zc=1`]]">


        and i get original image, but not thumbnaill.. <img src="/assets/images/products/batic/artisan_wine_batic_pinela.jpg">
        • The problem is you're only giving pThumb the value of [[+catalogue_product_image]] (in this case: batic/artisan_wine_batic_pinela.jpg). That's not the complete path and not enough for it to find the image. You've got the rest of the path out in front, but this doesn't get sent to the snippet. It'll never see that stuff before [[+catalogue_product_image.

          A simple fix is
          <img src="[[pthumb? &input=`assets/images/products/[[+catalogue_product_image]]` &options=`w=234&h=123&zc=1`]]">

          This way you're giving it the correct relative path to the file.

          The more proper way to do it would be to set up a media source which would automatically add the proper base path (assets/images/products) to image file names. Then you could write:
          <img src="[[+catalogue_product_image:pthumb=`w=234&h=123&zc=1`]]">
            Extras :: pThumbResizerimageSlimsetPlaceholders
            • 41049
            • 35 Posts
            I had already media source with base path to
            basePath Textfield assets/images/products/

            But I dont get that path out..

            • Probably you aren't using processed TV values? The processed value will have the full path but a raw value won't. For getResources/pdoResources, add this property to the call: &processTVs=`1`
                Extras :: pThumbResizerimageSlimsetPlaceholders
                • 41049
                • 35 Posts
                If I use first line of code with &processTVs=`1` or second line with or without &processTVs=`1`

                <img src="[[pthumb? &input=`assets/images/products/[[+catalogue_product_image]]` &options=`w=234&h=123&zc=1`]]">
                
                <img src="[[+catalogue_product_image:pthumb=`w=234&h=123&zc=1`]]">



                I get this error

                Fatal error: Cannot redeclare class phpThumbOf in /home/artisant/public_html/core/model/phpthumb/phpthumb.class.php on line 26


                I use my pthumb call in a chunk and I added &processTVs=`1` in my resource.
                  • 41049
                  • 35 Posts
                  Ok .. I got it working.. but on a different server.. hope this is not a server issue, because I'll have to eventually transfer page to this server..
                  • Quote from: denist at Jun 27, 2014, 10:52 AM
                    I get this error
                    Fatal error: Cannot redeclare class phpThumbOf in /home/artisant/public_html/core/model/phpthumb/phpthumb.class.php on line 26

                    Sounds like there's something else going on with your site. Have you got any other plugins or extras installed which deal with images? Like a special image tv extra? Other than that I don't know. The stock MODX phpthumb class doesn't declare a phpThumbOf class at all.
                      Extras :: pThumbResizerimageSlimsetPlaceholders