We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26503
    • 620 Posts
    The modx gallery extra suddenly stopped working on all my sites [on the same server] I've checked permissions and paths ~ they are fine. tested imagick ~ it is fine the only thing I can guess at is something to do with the php configuration.

    No idea what changed as I didn't make any changes to the apache or php configs ...

    here is the error from one of the sites:

    **UPDATE**
    OK, the gallery CAN upload zip files but still not individual or multi files, it seems to need the ZIP upload to create the gallery directory first ~THEN~ it can upload individual files.





    [root@ httpd]# cat  /vhome/domain.com/subdomains/subdomain/httpdocs/core/cache/logs/error.log
    [2014-07-25 13:19:13] (ERROR @ /assets/components/gallery/connector.php) [Gallery] Could not create directory (possibly already exists?): assets/gallery/14/
    [2014-07-25 13:19:14] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.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/vhosts/domain.com/subdomains/subdomain/httpdocs/core/cache/phpthumb/" in file "phpthumb.class.php" on line 958
        [2] => setting config_cache_directory to realpath(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/core/cache/phpthumb) = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/core/cache/phpthumb" in file "phpthumb.class.php" on line 986
        [3] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/) to $filename (/assets/gallery/14/131.jpg) resulting in ($AbsoluteFilename = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs//assets/gallery/14/131.jpg") in file "modphpthumb.class.php" on line 262
        [4] => setSourceFilename(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs//assets/gallery/14/131.jpg) set $this->sourceFilename to "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs//assets/gallery/14/131.jpg" in file "phpthumb.class.php" on line 262
        [5] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 958
        [6] => setting config_cache_directory to realpath(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache) = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 986
        [7] => setSourceFilename(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) set $this->sourceFilename to "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg" in file "phpthumb.class.php" on line 262
        [8] => CleanUpCacheDirectory() set to purge (30.0 days; 100.00 MB; 10,000 files) in file "phpthumb.class.php" on line 673
        [9] => CleanUpCacheDirectory() skipped because "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache/phpThumbCacheStats.txt" is recently modified in file "phpthumb.class.php" on line 683
        [10] =>                   file_exists() = 0 in file "phpthumb.class.php" on line 1165
        [11] => file_exists_ignoreopenbasedir() = 0 in file "phpthumb.class.php" on line 1166
        [12] =>                       is_file() = 0 in file "phpthumb.class.php" on line 1167
        [13] =>                 is_executable() = 0 in file "phpthumb.class.php" on line 1168
        [14] => using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1188
        [15] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1215
        [16] => ImageMagick convert --version says "Version: ImageMagick 6.2.8 05/07/12 Q16 file:" in file "phpthumb.class.php" on line 1223
        [17] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 917
        [18] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 923
        [19] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 934
        [20] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 941
        [21] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 951
        [22] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root (/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/) to $filename (/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) resulting in ($AbsoluteFilename = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg") in file "modphpthumb.class.php" on line 259
        [23] => $this->sourceFilename set to "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg" in file "phpthumb.class.php" on line 852
        [24] => phpThumb() v1.7.11-201108081537
    http://phpthumb.sourceforge.net
    
    Error messages disabled in file "phpthumb.class.php" on line 3845
        [25] => setCacheDirectory() starting with config_cache_directory = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 958
        [26] => setting config_cache_directory to realpath(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache) = "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/cache" in file "phpthumb.class.php" on line 986
        [27] => SetCacheFilename() _src set from md5($this->sourceFilename) "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg" = "a12a2d06507250d96ef5e54541cbf2de" in file "phpthumb.class.php" on line 3238
        [28] => SetCacheFilename() _par set from md5(_farC_zc1_h100_w100_dpi150_q75) in file "phpthumb.class.php" on line 3271
        [29] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 3033
        [30] => GetImageSize(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) says image is x in file "phpthumb.class.php" on line 3043
        [31] => GetImageSize("/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg") failed in file "phpthumb.class.php" on line 3076
        [32] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1315
        [33] => phpThumb_tempnam() returning "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/pThumbzv1vUI" in file "phpthumb.class.php" on line 4070
        [34] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1255
        [35] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1255
        [36] => GetImageSize(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1409
        [37] => GetImageSize(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) failed in file "phpthumb.class.php" on line 1556
        [38] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1939
        [39] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1252
        [40] => ImageMagick called as (convert -density '150' -thumbnail '100x100' -quality '75' -interlace line  '/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg[0]' jpeg:'/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/pThumbzv1vUI' 2>&1) in file "phpthumb.class.php" on line 1958
        [41] => ImageMagick failed with message (convert: unable to open image `/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg': No such file or directory.
    convert: missing an image filename `jpeg:/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/pThumbzv1vUI'.) in file "phpthumb.class.php" on line 1963
        [42] => deleting "/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/components/gallery/pThumbzv1vUI" in file "phpthumb.class.php" on line 1991
        [43] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3083
        [44] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 3012
        [45] => SetOrientationDependantWidthHeight() setting w="100", h="100" in file "phpthumb.class.php" on line 3028
        [46] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 3140
        [47] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3398
        [48] => starting ImageCreateFromFilename(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) in file "phpthumb.class.php" on line 3313
        [49] => empty $filename or GetImageSize(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) failed in file "phpthumb.class.php" on line 3362
        [50] => Populating $rawimagedata in file "phpthumb.class.php" on line 3370
        [51] => cannot fopen(/var/www/vhosts/domain.com/subdomains/subdomain/httpdocs/assets/gallery/14/131.jpg) in file "phpthumb.class.php" on line 3381
        [52] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3469
        [53] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3521
        [54] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3523
        [55] => phpThumb() v1.7.11-201108081537
    http://phpthumb.sourceforge.net
    
    Error messages disabled in file "phpthumb.class.php" on line 3845
        [56] => SourceImageToGD() failed in file "phpthumb.class.php" on line 342
    )





    Been through that error several times, but still no idea what is going on!! [ed. note: sean69 last edited this post 12 years, 2 months ago.]
      *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

      Sean Kimball CLP, CLS.
      Technical Director / Sr. Developer | BigBlock Studios
      ._______________________________________________.
      Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
      27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
      phone/fax: 905-426-5525
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Did you make any recent changes to the hosting environment, for example there have been several recent security exploits that could cause problems. Can you tell us more about the hosting environment as well?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 26503
        • 620 Posts
        Centos DV at MediaTemple... it's pretty stock. php 5.4.30


        been fighting with this all day now not really closer, but if I create the gallery directory with the modx file manager individual files will upload. it seems to be choking out on: !$mediaSource->createContainer($targetDir,'/') in core/components/gallery/model/gallery/galalbum.class.php ~ I can insert a little mkdir($targetDir, '0777); before that and the directory will get created. so I've got some kind of issue with ~how~ modx is trying to create that directory [on every single friggin modx/gallery site on the frikkin server! @#%#$%&&*!!! ]


        Quote from: AMDbuilder at Jul 25, 2014, 07:29 PM
        Did you make any recent changes to the hosting environment, for example there have been several recent security exploits that could cause problems. Can you tell us more about the hosting environment as well?
          *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

          Sean Kimball CLP, CLS.
          Technical Director / Sr. Developer | BigBlock Studios
          ._______________________________________________.
          Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
          27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
          phone/fax: 905-426-5525
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Do you know how Apache is configured to interact with PHP? It sounds like a user/permission related issue, for example the webserver is functioning with suPHP instead of mod_php which is causing the conflict.
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 26503
            • 620 Posts
            it's mod_php, I've compared the loaded modules on the production server with development [where it does work] and found nothing different that would affect file uploads. [I've been over the php.ini & included ini files line by line] ~ nothing looks out of place.

            though, if that were the case, then why would the zip upload work? that line: $mediaSource->createContainer($targetDir,'/') does not create the directory while the zip upload does. once the directory gets created [manually or VIA zip] then I can upload individual files. The two methods must be using two different methods to create the directory ~or~ one of them is not getting the new directory path correct? [and I have also tested a few different little php scripts to create directories and files and even tested imagick to see if they could create files/dirs .. all successful. it's something to do with modx.]



            Quote from: AMDbuilder at Jul 26, 2014, 01:18 AM
            Do you know how Apache is configured to interact with PHP? It sounds like a user/permission related issue, for example the webserver is functioning with suPHP instead of mod_php which is causing the conflict.
              *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

              Sean Kimball CLP, CLS.
              Technical Director / Sr. Developer | BigBlock Studios
              ._______________________________________________.
              Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
              27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
              phone/fax: 905-426-5525
              • 36613
              • 328 Posts
              I have the same problem. I use modx 2.4.2 and the last version of gallery.
              I i setting /var/www/mystite/public_html/ to 775 work but if i set /var/www/mystite/public_html/ to 755 or 750 the gallery don't create the folder. But if i create foder from modx file manager work.
              Modx gallery is a very big problem.
                • 8822
                • 203 Posts
                Did anyone figure out what the issue was here? I am having the same problem and looking for a solution??
                  • 36613
                  • 328 Posts
                  Quote from: Emily at May 03, 2016, 12:52 AM
                  Did anyone figure out what the issue was here? I am having the same problem and looking for a solution??
                  The problem is the permission o owner of gallery folder