We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43044
    • 9 Posts
    A change the server and there is problem with thumbs. How to fix this?

    Look: http://www.jdtrade.com.pl/assets/components/gallery/connector.php?action=web/phpthumb&w=556&h=500&zc=1&far=&q=100&src=http%3A%2F%2Fwww.jdtrade.com.pl%2Fassets%2Fgallery%2F4%2F32.png

    [2013-11-15 13:44:43] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: http://www.jdtrade.com.pl/assets/gallery/4/32.png - Debug: Array ( 
    [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216 
    [1] => setCacheDirectory() starting with config_cache_directory = "/home/grupajd/domains/jdtrade.com.pl/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919 
    [2] => setting config_cache_directory to realpath(/home/grupajd/domains/jdtrade.com.pl/public_html/core/cache/phpthumb) = "/home/grupajd/domains/jdtrade.com.pl/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 947 
    [3] => setSourceFilename(http://www.jdtrade.com.pl/assets/gallery/4/32.png) set $this->sourceFilename to "http://www.jdtrade.com.pl/assets/gallery/4/32.png" in file "phpthumb.class.php" on line 243 
    [4] => setCacheDirectory() starting with config_cache_directory = "/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 919 
    [5] => setting config_cache_directory to realpath(/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache) = "/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947 
    [6] => setSourceFilename(http://www.jdtrade.com.pl/assets/gallery/4/32.png) set $this->sourceFilename to "http://www.jdtrade.com.pl/assets/gallery/4/32.png" 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] => ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned () in file "phpthumb.class.php" on line 1131 
    [11] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884 
    [12] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895 
    [13] => $this->thumbnailFormat set to $this->f "png" in file "phpthumb.class.php" on line 902 
    [14] => $this->thumbnailQuality set to "99" in file "phpthumb.class.php" on line 912 
    [15] => $this->sourceFilename set to "http://www.jdtrade.com.pl/assets/gallery/4/32.png" in file "phpthumb.class.php" on line 813 [16] => setCacheDirectory() starting with config_cache_directory = "/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache" in file "phpthumb.class.php" on line 919 
    [17] => setting config_cache_directory to realpath(/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache) = "/home/grupajd/domains/jdtrade.com.pl/public_html/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947 
    [18] => SetCacheFilename() _src set from md5($this->sourceFilename) "http://www.jdtrade.com.pl/assets/gallery/4/32.png" = "42f2b3168728f47de30802ce6ad6f98a" in file "phpthumb.class.php" on line 3077 
    [19] => SetCacheFilename() _par set from md5(_zc1_h500_w556_dpi150) in file "phpthumb.class.php" on line 3110 
    [20] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897 
    [21] => GetImageSize("http://www.jdtrade.com.pl/assets/gallery/4/32.png") failed in file "phpthumb.class.php" on line 2920 
    [22] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 
    [23] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865 
    [24] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927 
    [25] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876 
    [26] => SetOrientationDependantWidthHeight() setting w="556", h="500" in file "phpthumb.class.php" on line 2892 
    [27] => exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 2974 
    [28] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229 
    [29] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 
    [30] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865 
    [31] => starting ImageCreateFromFilename(http://www.jdtrade.com.pl/assets/gallery/4/32.png) in file "phpthumb.class.php" on line 3152 
    [32] => empty $filename or GetImageSize(http://www.jdtrade.com.pl/assets/gallery/4/32.png) failed in file "phpthumb.class.php" on line 3201 [33] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209 
    [34] => cannot fopen(http://www.jdtrade.com.pl/assets/gallery/4/32.png) in file "phpthumb.class.php" on line 3212 
    [35] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278 
    [36] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330 
    [37] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332 
    [38] => phpThumb() v1.7.9-200712090829 Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647 
    [39] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323 ) 


      • 46332
      • 17 Posts
      I guess I may have a similar problem.

      I use MODx 2.2.10-pl on Debian. With Gallery, I can create new albums, upload pictures, however, I never get any thumbnails.

      MODx is not in directly in the webroot, rather I use an Apache "alias" directive to make MODx available.

      Example :
      <Directory "/var/www/MySite/html">
      ...
      </Directory>
      ...
      alias /test/modx /var/webapps/MODx_Test
      


      I looked at the MODx error log and found that the first problem occured at phpthumb.class.php:1025. In fact, the path of the file to process is calculated as is by PHPThumb :
      $AbsoluteFilename = $this->config_document_root.$filename;


      However, since I use an Apache alias, there are 2 problems with this code :

      • $this->config_document_root is set at the beginning with $_SERVER['DOCUMENT_ROOT'] which is correct but not appropriate for MODx since it is installed elsewhere.
      • the URI of the image to process is also used to process $filename but is also incorrect in this case since the URI contains information (beginning of the path) that is not related to the filesystem.

      As a result the $AbsoluteFilename is resolved as "/var/www/MySite/html/test/modx/assets/gallery/1/3.jpg" instead of "/var/webapps/test/MODx_Test/assets/gallery/1/3.jpg"

      I tryed a quick and dirty fix for this, but the same problem occurs at many places.

      Is this kind of problem related to an error in the MODx configuration or is Gallery (or rather phpthumbof) incompatible with Apache aliases ?
        • 36582
        • 463 Posts
        Any help (delete this post if I've misunderstood):

        https://github.com/splittingred/phpThumbOf/issues/10
          Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
          • 46332
          • 17 Posts
          Quote from: chrisandy at Jan 19, 2014, 07:13 PM
          Any help (delete this post if I've misunderstood):

          https://github.com/splittingred/phpThumbOf/issues/10

          Interesting. The description of the issue indicates it is the same kind of problem, however, the fix was for PHPThumbOf add-on. In the current case, the problem is within PHPThumb which is part of the core.
            • 36582
            • 463 Posts
            Ah - sorry - just looked at the title of your post rather than the code.

            You got Furls on?
              Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
              • 46332
              • 17 Posts
              Quote from: chrisandy at Jan 19, 2014, 07:59 PM
              You got Furls on?

              I guess you mean Friendly URLs. I activated those by renaming the "ht.access" file, but I did not notice any change in the way Gallery is working nor the way MODx manages URLs (I just discovered MODx 3 days ago).
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You need to go into the System Settings, and change the Use Friendly URLs setting to Yes. Use the Filter by Area drop-down and select the Friendly URL area.
                  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
                  • 46332
                  • 17 Posts
                  Quote from: sottwell at Jan 20, 2014, 03:51 AM
                  You need to go into the System Settings, and change the Use Friendly URLs setting to Yes. Use the Filter by Area drop-down and select the Friendly URL area.

                  Thanks, it worked at least for the URLs (BTW, this manipulation might be integrated within the MODx installation procedure).

                  However, this did not changed anything regarding the thumbnail generation. I still get the same error.
                    • 36582
                    • 463 Posts
                    I'm on the move right now so can't check but I think there is also a setting that allows thumbs to be created above the web root?
                      Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                      • 46332
                      • 17 Posts
                      Quote from: chrisandy at Jan 20, 2014, 09:07 AM
                      I'm on the move right now so can't check but I think there is also a setting that allows thumbs to be created above the web root?

                      Thanks for suggesting to play with settings.

                      I changed "gallery.thumbs_prepend_site_url"'s value to "yes" and it worked (although I don't understand why yet) !