modxbot / migrate

A testground for migrating issues and other such fun
0 stars 0 forks source link

Gallery - phpthumb.php does not work in all scenarios #10237

Open modxbot opened 11 years ago

modxbot commented 11 years ago

rwrozelle created Redmine issue ID 10237

The following code does not work properly for the scenarios.

if ($basePath != '/') {
    $src = str_replace(basename($basePath),'',$src);
    $src = ltrim($src,'/');
    $src = $basePath.$src;
}

I have installed MODX Revolution 2.2.9-pl (sdk) 2 levels deep on my hosted account

base_path: /home/content/e/l/f/elfsite/html/test/steppingstone/ base_url: /test/steppingstone/

I have not modified any default system settings in Gallery When I attempt to upload a file, I get the following errors:

[2013-09-27 12:30:11](ERROR @ /home/content/e/l/f/elfsite/html/test/steppingstone/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) [function.getimagesize]: failed to open stream: No such file or directory [2013-09-27 12:30:11](ERROR @ /home/content/e/l/f/elfsite/html/test/steppingstone/core/model/phpthumb/phpthumb.class.php : 1312) PHP warning: getimagesize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) [function.getimagesize]: failed to open stream: No such file or directory [2013-09-27 12:30:11](ERROR @ /home/content/e/l/f/elfsite/html/test/steppingstone/core/model/phpthumb/phpthumb.class.php : 3210) PHP warning: file_get_contents(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) [function.file-get-contents]: failed to open stream: No such file or directory [2013-09-27 12:30:11](ERROR @ /test/steppingstone/assets/components/gallery/connector.php) [phpThumbOf] Could not generate thumbnail: /home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG - Debug: Array ( [0] => phpThumb() v1.7.9-200712090829 in file "phpthumb.class.php" on line 216 [1] => setCacheDirectory() starting with config_cache_directory = "/home/content/e/l/f/elfsite/html/test/steppingstone/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919 [2] => setting config_cache_directory to realpath(/home/content/e/l/f/elfsite/html/test/steppingstone/core/cache/phpthumb) = "/home/content/e/l/f/elfsite/html/test/steppingstone/core/cache/phpthumb" in file "phpthumb.class.php" on line 947 [3] => ResolveFilenameToAbsolute() prepending $this->config_document_root (/home/content/e/l/f/elfsite/html) to $filename (/test/steppingstone/assets/gallery/1/14.JPG) resulting in ($AbsoluteFilename = "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/gallery/1/14.JPG") in file "phpthumb.class.php" on line 1025 [4] => setSourceFilename(/home/content/e/l/f/elfsite/html/test/steppingstone/assets/gallery/1/14.JPG) set $this->sourceFilename to "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/gallery/1/14.JPG" in file "phpthumb.class.php" on line 243 [5] => setCacheDirectory() starting with config_cache_directory = "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache/" in file "phpthumb.class.php" on line 919 [6] => setting config_cache_directory to realpath(/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache) = "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947 [7] => setSourceFilename(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) set $this->sourceFilename to "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG" in file "phpthumb.class.php" on line 243 [8] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652 [9] => file_exists() = 0 in file "phpthumb.class.php" on line 1101 [10] => is_executable() = 0 in file "phpthumb.class.php" on line 1102 [11] => using ImageMagick path from which convert (/usr/bin/convert) in file "phpthumb.class.php" on line 1121 [12] => ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1148 [13] => ImageMagick convert --version says "Version: ImageMagick 5.5.6 04/01/03 Q16 http:" in file "phpthumb.class.php" on line 1157 [14] => Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 878 [15] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884 [16] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895 [17] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902 [18] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912 [19] => ResolveFilenameToAbsolute() NOT prepending $this->config_document_root (/home/content/e/l/f/elfsite/html/test/steppingstone/) to $filename (/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) resulting in ($AbsoluteFilename = "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG") in file "phpthumb.class.php" on line 1022 [20] => $this->sourceFilename set to "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG" in file "phpthumb.class.php" on line 813 [21] => phpThumb() v1.7.9-200712090829

"/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG" does not exist in file "phpthumb.class.php" on line 3647 [22] => setCacheDirectory() starting with config_cache_directory = "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache" in file "phpthumb.class.php" on line 919 [23] => setting config_cache_directory to realpath(/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache) = "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache" in file "phpthumb.class.php" on line 947 [24] => SetCacheFilename() _src set from md5($this->sourceFilename) "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG" = "22698b273930ccb0bb4e5269b5d67770" in file "phpthumb.class.php" on line 3077 [25] => SetCacheFilename() _par set from md5(_farC_zc1_h100_w100_dpi150_q75) in file "phpthumb.class.php" on line 3110 [26] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897 [27] => GetImageSize("/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG") failed in file "phpthumb.class.php" on line 2920 [28] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 [29] => phpThumb_tempnam() returning "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/pThumbbLHgB3" in file "phpthumb.class.php" on line 3861 [30] => ImageMagickSwitchAvailable(thumbnail) = 0 in file "phpthumb.class.php" on line 1189 [31] => IMuseExplicitImageOutputDimensions = 0 in file "phpthumb.class.php" on line 1299 [32] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189 [33] => GetImageSize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) FAILED with error "" in file "phpthumb.class.php" on line 1318 [34] => GetImageSize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) failed in file "phpthumb.class.php" on line 1460 [35] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807 [36] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186 [37] => ImageMagick called as (convert -density 150 -resize 100x100 -quality 75 -interlace line "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG[0]" jpeg:"/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/pThumbbLHgB3" 2>&1) in file "phpthumb.class.php" on line 1826 [38] => ImageMagick failed with message (convert: Unable to open file (/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) [No such file or directory].) in file "phpthumb.class.php" on line 1834 [39] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927 [40] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876 [41] => SetOrientationDependantWidthHeight() setting w="100", h="100" in file "phpthumb.class.php" on line 2892 [42] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979 [43] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229 [44] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232 [45] => phpThumb_tempnam() returning "/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/pThumbBsDtW4" in file "phpthumb.class.php" on line 3861 [46] => ImageMagickSwitchAvailable(thumbnail) = 0 in file "phpthumb.class.php" on line 1189 [47] => IMuseExplicitImageOutputDimensions = 0 in file "phpthumb.class.php" on line 1299 [48] => ImageMagickSwitchAvailable(density) = 1 in file "phpthumb.class.php" on line 1189 [49] => GetImageSize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) FAILED with error "" in file "phpthumb.class.php" on line 1318 [50] => GetImageSize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) failed in file "phpthumb.class.php" on line 1460 [51] => Remaining $this->fltr after ImageMagick: (array(0) { } ) in file "phpthumb.class.php" on line 1807 [52] => ImageMagickSwitchAvailable(quality;interlace) = 1 in file "phpthumb.class.php" on line 1186 [53] => ImageMagick called as (convert -density 150 -resize 100x100 -quality 75 -interlace line "/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG[0]" jpeg:"/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/pThumbBsDtW4" 2>&1) in file "phpthumb.class.php" on line 1826 [54] => ImageMagick failed with message (convert: Unable to open file (/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) [No such file or directory].) in file "phpthumb.class.php" on line 1834 [55] => starting ImageCreateFromFilename(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) in file "phpthumb.class.php" on line 3152 [56] => empty $filename or GetImageSize(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) failed in file "phpthumb.class.php" on line 3201 [57] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209 [58] => cannot fopen(/home/content/e/l/f/elfsite/html/test/steppingstone/test//assets/gallery/1/14.JPG) in file "phpthumb.class.php" on line 3212 [59] => Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3278 [60] => $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3330 [61] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3332 [62] => phpThumb() v1.7.9-200712090829

Unknown image type identified by "" () in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647 [63] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323 )

[2013-09-27 12:30:11](ERROR @ /home/content/e/l/f/elfsite/html/test/steppingstone/core/components/gallery/processors/web/phpthumb.php : 152) PHP warning: file_get_contents(/home/content/e/l/f/elfsite/html/test/steppingstone/assets/components/gallery/cache/_home_content_e_l_f_elfsite_html_test_steppingstone_test__assets_gallery_1_14.JPG.d84a48428cddfbd90840f3699046c483.jpg) [function.file-get-contents]: failed to open stream: No such file or directory