We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19975
    • 429 Posts
    I am currently unable to use phpThumbOf to output images within my website. I am using Modx 2.3.2-pl Advanced install.

    I am seeing the following message within the error log:

     [2015-01-12 11:49:27] (ERROR @ /-------/connectors/index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 1054
        [2] => Unknown column 'name' in 'order clause'
    )
    [2015-01-12 11:55:16] (ERROR @ /-------/index.php) [phpThumbOf] Could not generate thumbnail: assets/images/test/beach_blue_sea.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
        [1] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb/" in file "phpthumb.class.php" on line 961
        [2] => setting config_cache_directory to realpath(/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb) = "/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb" in file "phpthumb.class.php" on line 989
        [3] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 961
        [4] => setting config_cache_directory to realpath(/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache) = "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 989
        [5] => setSourceFilename(assets/images/test/beach_blue_sea.jpg) set $this->sourceFilename to "assets/images/test/beach_blue_sea.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 "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 677
        [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 "/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.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) "/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg" = "42ada426ee9623365ce831e18367b5cd" in file "phpthumb.class.php" on line 3443
        [15] => SetCacheFilename() _par set from md5(_farC_zc1_h120_w120_dpi150_q75) in file "phpthumb.class.php" on line 3476
        [16] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
        [17] => GetImageSize(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) says image is x in file "phpthumb.class.php" on line 3246
        [18] => GetImageSize("/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.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="120", h="120" in file "phpthumb.class.php" on line 3231
        [24] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
        [25] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
        [26] => starting ImageCreateFromFilename(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) in file "phpthumb.class.php" on line 3518
        [27] => empty $filename or GetImageSize(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) failed in file "phpthumb.class.php" on line 3567
        [28] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
        [29] => cannot fopen(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) in file "phpthumb.class.php" on line 3586
        [30] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
        [31] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
        [32] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
        [33] => 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
        [34] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
    )
    
    [2015-01-12 11:55:17] (ERROR @ /-------/index.php) [phpThumbOf] Could not generate thumbnail: assets/images/test/beach_blue_sea.jpg - Debug: Array
    (
        [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
        [1] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb/" in file "phpthumb.class.php" on line 961
        [2] => setting config_cache_directory to realpath(/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb) = "/var/www/vhosts/-------.com/httpdocs/-------/core/cache/phpthumb" in file "phpthumb.class.php" on line 989
        [3] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 961
        [4] => setting config_cache_directory to realpath(/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache) = "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 989
        [5] => setSourceFilename(assets/images/test/beach_blue_sea.jpg) set $this->sourceFilename to "assets/images/test/beach_blue_sea.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 "/var/www/vhosts/-------.com/httpdocs/-------/assets/components/phpthumbof/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 677
        [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 "/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.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) "/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg" = "42ada426ee9623365ce831e18367b5cd" in file "phpthumb.class.php" on line 3443
        [15] => SetCacheFilename() _par set from md5(_farC_zc1_h120_w120_dpi150_q75) in file "phpthumb.class.php" on line 3476
        [16] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
        [17] => GetImageSize(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) says image is x in file "phpthumb.class.php" on line 3246
        [18] => GetImageSize("/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.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="120", h="120" in file "phpthumb.class.php" on line 3231
        [24] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
        [25] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
        [26] => starting ImageCreateFromFilename(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) in file "phpthumb.class.php" on line 3518
        [27] => empty $filename or GetImageSize(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) failed in file "phpthumb.class.php" on line 3567
        [28] => Populating $rawimagedata in file "phpthumb.class.php" on line 3575
        [29] => cannot fopen(/var/www/vhosts/-------.com/httpdocs/-------/-------/assets/images/test/beach_blue_sea.jpg) in file "phpthumb.class.php" on line 3586
        [30] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
        [31] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
        [32] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
        [33] => 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
        [34] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
    )
    
    
    
    
    
    [ed. note: SandersDesign last edited this post 9 years, 2 months ago.]
      Martin Sanders - Design & Web Development
      • 49529
      • 196 Posts
      phpThumbOf is officially obsolete: https://github.com/modxcms/phpThumbOf.
        • 19975
        • 429 Posts
        phpThumbOf is officially obsolete: https://github.com/modxcms/phpThumbOf.

        Thanks, I have now updates my code to pThumb but still seem to how the following bug;


         [2015-01-12 14:11:48] (ERROR @ /------/connectors/index.php) Error 42S22 executing statement: 
        Array
        (
            [0] => 42S22
            [1] => 1054
            [2] => Unknown column 'name' in 'order clause'
        )
          Martin Sanders - Design & Web Development
          • 19975
          • 429 Posts
          Looking at the error log this issue seems to be two independent issues :S

          I have removed all phpthumb scripts but still have the following error message:

          [2015-01-12 17:21:29] (ERROR @ /-----/connectors/index.php) Error 42S22 executing statement: 
          Array
          (
              [0] => 42S22
              [1] => 1054
              [2] => Unknown column 'name' in 'order clause'
          )


          I have disabled all plugins and identified the error as being produced on saving a resource. The message seems to be produced whether the template in "empty" or styled so I know it's not a template snippet related issue.

          Is my database corrupt?
            Martin Sanders - Design & Web Development
            • 3749
            • 24,544 Posts
            I think one of your updates didn't take. There's a recent update that added a 'name' field to the modx_context table, and a new table: modx_extension_packages. If you skipped over the upgrade that did this, it's supposed to happen anyway, but I've seen a number of reports from people where it didn't.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 19975
              • 429 Posts
              I think one of your updates didn't take. There's a recent update that added a 'name' field to the modx_context table, and a new table: modx_extension_packages. If you skipped over the upgrade that did this, it's supposed to happen anyway, but I've seen a number of reports from people where it didn't.
              There seems to be a "name" column within the modx_context table and modx_extension_packages table. The site was installed using 2.3.2 and has not been upgraded.
                Martin Sanders - Design & Web Development
                • 19975
                • 429 Posts
                I've located the source of the bug, seems VersionX has issues

                http://forums.modx.com/thread/95773/error-42s22-executing-statement#dis-post-518435
                  Martin Sanders - Design & Web Development