We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32873
    • 9 Posts
    Hi everyone, hi shaun,

    I’m working with revolution 2.1.1-pl on a Linux-based shared-hosting server. I would love to use the Gallery plugin, but I am constantly running into problems somehow wink I am pretty sure this is is due to my hosting environment. However, that can’t be changed soon so I’ll have to find a way around the problem.

    Gallery is not showing any thumbnails, neither on the manager page (in components) nor on the frontend page through the gallery snippet. The thumbnails just can’t be created. Now phpthumb and GD and so on are definitly working and set up correctly, because the filebrowser can display thumbnails and creates them.

    I know Gallery is using it’s own connector to call phpthumb, so this seems to be where the problem is. Gallery generates this to display a thumbnail:

    /assets/components/gallery/connector.php?action=web/phpthumb&h=100&w=100&zc=1&far=C&src=http%3A%2F%2Fwww.my-domain.com%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F7%2F16.jpg


    This is not! working.

    In comparison, this is the call the filebrowser uses:

    /connectors/system/phpthumb.php?src=%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F7%2F16.jpg&w=80&h=60&f=jpg&q=90&HTTP_MODAUTH=0&wctx=web&basePath=&basePathRelative=1&baseUrl=&baseUrlRelative=1
    


    and this works! I tried duplicating all the additional arguments from the second call to the first call manually to change it to a relative url and call it in the browser, but that didn’t work either. So the connector.php does just go a different way then the phpthumb.php.

    I know, that this normally shouldn’t matter and just work, but my hosting seems to be a bit funny. I already had to set the phpthumb_document_root manually, because my DOCUMENT_ROOT is not set as one would expect.

    So, do you have any ideas on how to move on? Where (in which file) is the call to connector.php with its arguments generated? As much as I would prefer a solid, valid solution, I got to the point where I wouldn’t mind changing a core file to make it call phpthumb.php directly to generate the thumbnail.

    Any help is very appreciated!

    Simon
      • 32873
      • 9 Posts
      I forgot to add this: I think it needs to be a relative URL in the call, because php’s allow_url_fopen is turned off. It seems to run into problems with absolute URLs including http://....
        • 32873
        • 9 Posts
        ok, more information (concentrate on [34] in the debug array, I think):

        [2011-06-19 18:23:40] (ERROR @ /vhost/vhost5/m/y/-/my-domain.com/www/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0
        [2011-06-19 18:23:40] (ERROR @ /vhost/vhost5/m/y/-/my-domain.com/www/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg): failed to open stream: no suitable wrapper could be found
        [2011-06-19 18:24:01] (ERROR @ /vhost/vhost5/m/y/-/my-domain.com/www/core/model/phpthumb/phpthumb.class.php : 3210) PHP warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0
        [2011-06-19 18:24:01] (ERROR @ /vhost/vhost5/m/y/-/my-domain.com/www/core/model/phpthumb/phpthumb.class.php : 3210) PHP warning: file_get_contents(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg): failed to open stream: no suitable wrapper could be found
        [2011-06-19 18:24:01] (ERROR @ /assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: http://www.my-domain.com/assets/components/gallery/files/7/17.jpg - Debug: Array
        (
            [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216
            [1] => setCacheDirectory() starting with config_cache_directory = "/vhost/vhost5/m/y/-/my-domain.com/www/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
            [2] => setting config_cache_directory to realpath(/vhost/vhost5/m/y/-/my-domain.com/www/core/cache/phpthumb) = "/vhost/vhost5/m/y/-/my-domain.com/www/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
            [3] => setSourceFilename(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) set $this->sourceFilename to "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg" in file "phpthumb.class.php" on line 243
            [4] => setCacheDirectory() starting with config_cache_directory = "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 919
            [5] => setting config_cache_directory to realpath(/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache) = "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
            [6] => setSourceFilename(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) set $this->sourceFilename to "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg" 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] => using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1121
            [11] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148
            [12] => ImageMagick convert --version says "Version: ImageMagick 6.2.8 10/20/10 Q16 file:" in file "phpthumb.class.php" on line 1157
            [13] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 878
            [14] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
            [15] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
            [16] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902
            [17] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912
            [18] => $this->sourceFilename set to "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg" in file "phpthumb.class.php" on line 813
            [19] => setCacheDirectory() starting with config_cache_directory = "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache" in file "phpthumb.class.php" on line 919
            [20] => setting config_cache_directory to realpath(/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache) = "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947
            [21] => SetCacheFilename() _src set from md5($this->sourceFilename) "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg" = "9e57e4abd7809135886231e6076889d0" in file "phpthumb.class.php" on line 3077
            [22] => SetCacheFilename() _par set from md5(_farC_zc1_h100_w100_dpi150_q75) in file "phpthumb.class.php" on line 3110
            [23] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
            [24] => GetImageSize("http://www.my-domain.com/assets/components/gallery/files/7/17.jpg") failed in file "phpthumb.class.php" on line 2920
            [25] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
            [26] => phpThumb_tempnam() returning "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbiSUEz2" in file "phpthumb.class.php" on line 3861
            [27] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
            [28] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
            [29] => GetImageSize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1318
            [30] => GetImageSize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) failed in file "phpthumb.class.php" on line 1460
            [31] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
            [32] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186
            [33] => ImageMagick called as (convert -density 150 -thumbnail 100x100 -quality 75 -interlace line  "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg[0]" jpeg:"/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbiSUEz2" 2>&1) in file "phpthumb.class.php" on line 1826
            [34] => ImageMagick failed with message (error : Operation in progress
        convert: no data returned `http://www.my-domain.com/assets/components/gallery/files/7/17.jpg'.
        convert: missing an image filename `jpeg:/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbiSUEz2'.) in file "phpthumb.class.php" on line 1834
            [35] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
            [36] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
            [37] => SetOrientationDependantWidthHeight() setting w="100", h="100" in file "phpthumb.class.php" on line 2892
            [38] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979
            [39] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
            [40] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
            [41] => phpThumb_tempnam() returning "/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbGYLLrF" in file "phpthumb.class.php" on line 3861
            [42] => ImageMagickSwitchAvailable(thumbnail) = 1 in file "phpthumb.class.php" on line 1189
            [43] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189
            [44] => GetImageSize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) FAILED with error "" in file "phpthumb.class.php" on line 1318
            [45] => GetImageSize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) failed in file "phpthumb.class.php" on line 1460
            [46] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807
            [47] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186
            [48] => ImageMagick called as (convert -density 150 -thumbnail 100x100 -quality 75 -interlace line  "http://www.my-domain.com/assets/components/gallery/files/7/17.jpg[0]" jpeg:"/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbGYLLrF" 2>&1) in file "phpthumb.class.php" on line 1826
            [49] => ImageMagick failed with message (error : Operation in progress
        convert: no data returned `http://www.my-domain.com/assets/components/gallery/files/7/17.jpg'.
        convert: missing an image filename `jpeg:/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/pThumbGYLLrF'.) in file "phpthumb.class.php" on line 1834
            [50] => starting ImageCreateFromFilename(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) in file "phpthumb.class.php" on line 3152
            [51] => empty $filename or GetImageSize(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) failed in file "phpthumb.class.php" on line 3201
            [52] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209
            [53] => cannot fopen(http://www.my-domain.com/assets/components/gallery/files/7/17.jpg) in file "phpthumb.class.php" on line 3212
            [54] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278
            [55] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330
            [56] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332
            [57] => phpThumb() v1.7.9-200712090829
        
        Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647
            [58] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
        )
        
        [2011-06-19 18:24:01] (ERROR @ /vhost/vhost5/m/y/-/my-domain.com/www/core/components/gallery/processors/web/phpthumb.php : 133) PHP warning: file_get_contents(/vhost/vhost5/m/y/-/my-domain.com/www/assets/components/gallery/cache/http___www.my-domain.com_assets_components_gallery_files_7_17.jpg.a101ea25babfa67ad262fb0024ae12c5.jpg): failed to open stream: No such file or directory


        Anyone any ideas, this can’t be unfixable! smiley

        Simon
          • 32873
          • 9 Posts
          OK, resolved this by setting gallery.files-url to files/.
          Also this needs to be applied: https://github.com/splittingred/Gallery/issues/112

          Hope this helps others:)
            • 7743
            • 3 Posts
            Thank you! Problem solved at last.
              • 32873
              • 9 Posts
              Be aware though, that this solution is still not very solid. For example, the [[+image-absolute]] placeholder also uses the gallery.files_url setting. However, that needs! the full assets/components/files path, because the script is running in the the document_root folder, whereas the working directory of gallery’s connector.php is in assets/components already.

              Therefore, if you want to use [[+image-absolute]] you have to use something like .... src="assets/components/[[+image-absolute]]" ...