We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36485
    • 99 Posts
    Gros bonnet de la COGIP Reply #1, 11 years, 8 months ago
    Hi all

    Sorry if this is a known issue.

    I've just updated a site from Revo 2.2.4 to Revo 2.3.3.

    The website works fine except the picture managed vy Gallery (1.7.0). Items are in the albums, binaries are in the file system but the picture are not displayed anymore (broken link).

    If i check url of the broken links, i get that for instance :
    http://www.monsite.net/site/assets/components/gallery/connector.php?action=web/phpthumb&ctx=mgr&src=%2Fsite%2F%2Fsite%2Fassets%2Fgallery%2F4%2F13.jpg

    I don't know if it is the only issue but i don't know why i get twice "site" in the "src" before "assets/gallery/4/13.jpg"

    I have these settings :
    - System parameters
    gallery.files_path [[++assets_path]]gallery/
    gallery.files_url [[++assets_url]]gallery/

    - /www/site/core/config/config.inc.php
    $modx_assets_path= '/home/nomclient/www/site/assets/';
    $modx_assets_url= '/site/assets/';
    define('MODX_ASSETS_PATH', $modx_assets_path);
    define('MODX_ASSETS_URL', $modx_assets_url);

    Is there somebody that can help me pls ?
      • 36485
      • 99 Posts
      Gros bonnet de la COGIP Reply #2, 11 years, 8 months ago
      I get this kind of error logs :
      [2015-02-15 18:30:02] (ERROR @ /site/assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /homez.29/morvandi/www/site/assets/gallery/5/24.jpg - Debug: Array
      (
          [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
          [1] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/site//site/assets/gallery/5/24.jpg) resulting in ($AbsoluteFilename = "/site//site/assets/gallery/5/24.jpg") in file "phpthumb.class.php" on line 1216
          [2] => resolvePath: /site//site/assets/gallery/5/24.jpg (allowed_dirs: Array
      (
      )
      ) in file "phpthumb.class.php" on line 1096
          [3] => resolvePath: iteration, path=/site//site/assets/gallery/5/24.jpg, base path = /home/morvandi/www/site/assets/components/gallery in file "phpthumb.class.php" on line 1115
          [4] => open_basedir: "" in file "phpthumb.class.php" on line 1082
          [5] => resolvePath: stop at component 8 in file "phpthumb.class.php" on line 1131
          [6] => resolvePath: stop at path=/site/site/assets/gallery/5/24.jpg in file "phpthumb.class.php" on line 1134
          [7] => resolvePath: no match, returning null in file "phpthumb.class.php" on line 1136
          [8] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/home/morvandi/www/site/assets/components/gallery") to null in file "phpthumb.class.php" on line 1261
          [9] => setSourceFilename() set $this->sourceFilename to "" in file "phpthumb.class.php" on line 271
          [10] => setSourceFilename(/homez.29/morvandi/www/site/assets/gallery/5/24.jpg) set $this->sourceFilename to "/homez.29/morvandi/www/site/assets/gallery/5/24.jpg" in file "phpthumb.class.php" on line 271
          [11] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file "phpthumb.class.php" on line 667
          [12] => skipping CleanUpCacheDirectory() because config set to not use it in file "phpthumb.class.php" on line 787
          [13] => CleanUpCacheDirectory() purged 0 files (from 0) based on config settings in file "phpthumb.class.php" on line 793
          [14] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
          [15] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
          [16] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
          [17] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
          [18] => $this->thumbnailQuality set to "90" in file "phpthumb.class.php" on line 953
          [19] => resolvePath: /homez.29/morvandi/www/site/assets/gallery/5/24.jpg (allowed_dirs: Array
      (
      )
      ) in file "phpthumb.class.php" on line 1096
          [20] => resolvePath: iteration, path=/homez.29/morvandi/www/site/assets/gallery/5/24.jpg, base path = /home/morvandi/www/site in file "phpthumb.class.php" on line 1115
          [21] => resolvePath: stop at component 1 in file "phpthumb.class.php" on line 1131
          [22] => resolvePath: stop at path=/homez.29 in file "phpthumb.class.php" on line 1134
          [23] => resolvePath: no match, returning null in file "phpthumb.class.php" on line 1136
          [24] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/home/morvandi/www/site") to null in file "phpthumb.class.php" on line 1261
          [25] => $this->sourceFilename set to "" in file "phpthumb.class.php" on line 849
          [26] => 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
          [27] => resolvePath: /homez.29/morvandi/www/site/assets/gallery/5/24.jpg (allowed_dirs: Array
      (
      )
      ) in file "phpthumb.class.php" on line 1096
          [28] => resolvePath: iteration, path=/homez.29/morvandi/www/site/assets/gallery/5/24.jpg, base path = /home/morvandi/www/site in file "phpthumb.class.php" on line 1115
          [29] => resolvePath: stop at component 1 in file "phpthumb.class.php" on line 1131
          [30] => resolvePath: stop at path=/homez.29 in file "phpthumb.class.php" on line 1134
          [31] => resolvePath: no match, returning null in file "phpthumb.class.php" on line 1136
          [32] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/home/morvandi/www/site") to null in file "phpthumb.class.php" on line 1261
          [33] => SetCacheFilename() _src set from md5($this->sourceFilename) "" = "d41d8cd98f00b204e9800998ecf8427e" in file "phpthumb.class.php" on line 3443
          [34] => SetCacheFilename() _par set from md5(_farC_zc1_h100_w100_dpi150_q90) in file "phpthumb.class.php" on line 3476
          [35] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3236
          [36] => skipping GetImageSize() because $this->sourceFilename is empty in file "phpthumb.class.php" on line 3248
          [37] => GetImageSize("") failed in file "phpthumb.class.php" on line 3279
          [38] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1508
          [39] => ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1552
          [40] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3286
          [41] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3215
          [42] => SetOrientationDependantWidthHeight() setting w="100", h="100" in file "phpthumb.class.php" on line 3231
          [43] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3343
          [44] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3603
          [45] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3674
          [46] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3726
          [47] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3728
          [48] => 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
          [49] => SourceImageToGD() failed in file "phpthumb.class.php" on line 351
      )
        • 36485
        • 99 Posts
        Gros bonnet de la COGIP Reply #3, 11 years, 8 months ago
        I guess my problem is linked to phpthumb.

        Instead of having a resolvePath like /site/assets/gallery/5/24.jpg (for instance),
        i get /site//site/assets/gallery/5/24.jpg

        Could somebody explain to me why i get this additionnal "/site" pls ?
          • 49998
          • 9 Posts
          Hello everyone. I have nearly same problem.

          Gallery 1.7.0-pl
          ModX Revo 2.3.2-pl (traditional)

          A thumbs doesn't generate when I upload new image in album (original file uploaded and i can see it in file manager at folder /assets/gallery/).
          Same thing on site page: image's absolute link is right but thumb's link is somethink like

          /assets/components/gallery/connector.php?action=web/phpthumb&ctx=web&w=200&h=200&zc=1&far=C&q=90&src=%2Fassets%2Fgallery%2F1%2F2.jpg


          Using src="[[+thumbnail]]" in thumb's tpl.

          Screenshot admin panel:




          Errors' log looks like topicstrater's but it's no any "/site/" in urls.

          [2015-03-04 12:45:08] (ERROR @ /home/users/s/spiritius/domains/spiritius.net/core/components/gallery/processors/web/phpthumb.php : 169) PHP warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for /home/users2/s/spiritius/domains/spiritius.net/assets/components/gallery/cache/_home_users2_s_spiritius_domains_spiritius.net_assets_gallery_1_1.jpg.c39b96fa7c01691f4fe22ccbc452cba0.jpg
          [2015-03-04 12:45:08] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /home/users2/s/spiritius/domains/spiritius.net/assets/gallery/1/2.jpg - Debug: Array
          (
              [0] => phpThumb() v1.7.13-201406261000 in file "phpthumb.class.php" on line 220
              [1] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root () to $filename (/assets/gallery/1/2.jpg) resulting in ($AbsoluteFilename = "/assets/gallery/1/2.jpg") in file "phpthumb.class.php" on line 1216
              [2] => resolvePath: /assets/gallery/1/2.jpg (allowed_dirs: Array
          (
          )
          ) in file "phpthumb.class.php" on line 1096
              [3] => resolvePath: iteration, path=/assets/gallery/1/2.jpg, base path = /home/users/s/spiritius/domains/spiritius.net/assets/components/gallery in file "phpthumb.class.php" on line 1115
              [4] => open_basedir: "" in file "phpthumb.class.php" on line 1082
              [5] => resolvePath: stop at component 5 in file "phpthumb.class.php" on line 1131
              [6] => resolvePath: stop at path=/assets/gallery/1/2.jpg in file "phpthumb.class.php" on line 1134
              [7] => resolvePath: no match, returning null in file "phpthumb.class.php" on line 1136
              [8] => !$this->config_allow_src_above_docroot therefore setting "" (outside "/home/users/s/spiritius/domains/spiritius.net/assets/components/gallery") to null in file "phpthumb.class.php" on line 1261
              [9] => setSourceFilename() set $this->sourceFilename to "" in file "phpthumb.class.php" on line 271
              [10] => setSourceFilename(/home/users2/s/spiritius/domains/spiritius.net/assets/gallery/1/2.jpg) set $this->sourceFilename to "/home/users2/s/spiritius/domains/spiritius.net/assets/gallery/1/2.jpg" in file "phpthumb.class.php" on line 271
              [11] => CleanUpCacheDirectory() set to purge (NULL days; NULL MB; NULL files) in file "phpthumb.class.php" on line 667
              [12] => CleanUpCacheDirectory() skipped because "/home/users2/s/spiritius/domains/spiritius.net/assets/components/gallery/cache//phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 677
              [13] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 919
              [14] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 925
              [15] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 936
              [16] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 943
              [17] => $this->thumbnailQuality set to "90" in file "phpthumb.class.php" on line 953
              [18] => resolvePath: /home/users2/s/spiritius/domains/spiritius.net/assets/gallery/1/2.jpg (allowed_dirs: Array
            • 17723
            • 221 Posts
            I'm having exactly same problem as you.
            Did you managed to fix the problem.

            Running Revo 2.3.3, Gallery 1.7.1, PHP 5.2.8
              Lucas from AroundCyprus.net
              • 36549
              • 572 Posts
              Hi
              I was also getting errors for phpThumb and Gallery when i upgraded to Gallery 1.7 and Modx 2.3.3.
              I solved this issue by changing the Gallery System Setting 'Prepend Site URL to Thumbs' to 'No'.
              I also manually cleared the cache and installed pThumb as a replacement for phpThumbOf as it's a better alternative.
              Might be worth a try anyway.
                www.9thwave.co.uk
                   WEB | DESIGN | PRINT
                • 36485
                • 99 Posts
                Gros bonnet de la COGIP Reply #7, 11 years, 5 months ago
                Hi

                Thx for the answers.
                I haven't succeed in resolving the issue.
                I will probably try pThumb.
                  • 9342
                  • 50 Posts
                  Quote from: 9thwave at Apr 29, 2015, 03:30 AM
                  Hi
                  I was also getting errors for phpThumb and Gallery when i upgraded to Gallery 1.7 and Modx 2.3.3.
                  I solved this issue by changing the Gallery System Setting 'Prepend Site URL to Thumbs' to 'No'.
                  I also manually cleared the cache and installed pThumb as a replacement for phpThumbOf as it's a better alternative.
                  Might be worth a try anyway.

                  Tried your solution, still doesn't work.

                  My issue is I can see all the old images that were uploaded before upgrading only if I choose the Media Source to Gallery type. But still I could not upload any new images to the existing album, or even a new one.

                  In contrast, if I choose to use media source as Files System, I could not the all the images uploaded before, but the new one can be uploaded just fine.


                    • 50558
                    • 1 Posts
                    Hey,
                    I had the same problems with Gallery and phpThumbOf – broken image links because of the "double subfolder path". I also tried the pThumb method with no success.
                    But I figuered out, that in my case it was a problem with file ownership and permissions. PHP was running as an Apache Modul, so there were different ownerships for FTP-User and PHP-User. I tried several things which ended in a mess wink

                    My solution:
                    I switched to running PHP as CGI. Installed MODx in a new subfolder and transferred all necessary elements to the new installation. Now everything works fine.
                    Seems like there is a problem with the connector file when ownerships aren't correct...
                      • 36485
                      • 99 Posts
                      Gros bonnet de la COGIP Reply #10, 11 years, 4 months ago
                      It seems many people has got the problem.
                      So, in 2015, what is a reliable solution to have a gallery with thumbnails with MODx 2.3.3 ?
                      I'm a bit scared...