Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filename spaces causing error and no image returned #36

Closed
pyrographics opened this issue Feb 29, 2012 · 2 comments
Closed

Filename spaces causing error and no image returned #36

pyrographics opened this issue Feb 29, 2012 · 2 comments

Comments

@pyrographics
Copy link

The following error shows up on one of our sites using phpthumbof 1.3.1. Changing to use the phpthumb connector directly works correctly.

[2012-02-29 12:30:21](ERROR @ /index.php) [phpThumbOf] Could not generate thumbnail: http://mywebsite.com/assets/images/stores/thisstore/test space issue.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/mywebsite/public_html/core/cache/phpthumb/" in file "phpthumb.class.php" on line 919
[2] => setting config_cache_directory to realpath(/home/mywebsite/public_html/core/cache/phpthumb) = "/home/mywebsite/public_html/core/cache/phpthumb" in file "phpthumb.class.php" on line 947
[3] => setCacheDirectory() starting with config_cache_directory = "/home/mywebsite/public_html/assets/components/phpthumbof/cache/" in file "phpthumb.class.php" on line 919
[4] => setting config_cache_directory to realpath(/home/mywebsite/public_html/assets/components/phpthumbof/cache) = "/home/mywebsite/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
[5] => setSourceFilename(http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg) set $this->sourceFilename to "http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg" in file "phpthumb.class.php" on line 243
[6] => skipping CleanUpCacheDirectory() set to purge (30.0 days; 100.00MB; 10,000 files) in file "phpthumb.class.php" on line 652
[7] => file_exists() = 0 in file "phpthumb.class.php" on line 1101
[8] => is_executable() = 0 in file "phpthumb.class.php" on line 1102
[9] => ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and which convert returned (which: no convert in (/bin:/usr/bin)) in file "phpthumb.class.php" on line 1131
[10] => $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 884
[11] => $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 895
[12] => $this->thumbnailFormat set to $this->f "jpeg" in file "phpthumb.class.php" on line 902
[13] => $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 912
[14] => $this->sourceFilename set to "http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg" in file "phpthumb.class.php" on line 813
[15] => setCacheDirectory() starting with config_cache_directory = "/home/mywebsite/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 919
[16] => setting config_cache_directory to realpath(/home/mywebsite/public_html/assets/components/phpthumbof/cache) = "/home/mywebsite/public_html/assets/components/phpthumbof/cache" in file "phpthumb.class.php" on line 947
[17] => SetCacheFilename() _src set from md5($this->sourceFilename) "http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg" = "6c0b8d13a6a77d4d43903a35f1c81f1f" in file "phpthumb.class.php" on line 3077
[18] => SetCacheFilename() _par set from md5(_farC_zc1_h140_w140_dpi150_q75) in file "phpthumb.class.php" on line 3110
[19] => starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2897
[20] => GetImageSize("http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg") failed in file "phpthumb.class.php" on line 2920
[21] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
[22] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
[23] => ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2927
[24] => SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2876
[25] => SetOrientationDependantWidthHeight() setting w="140", h="140" in file "phpthumb.class.php" on line 2892
[26] => EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2979
[27] => starting SourceImageToGD() in file "phpthumb.class.php" on line 3229
[28] => $this->useRawIMoutput=true after checking $UnAllowedParameters in file "phpthumb.class.php" on line 1232
[29] => ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1865
[30] => starting ImageCreateFromFilename(http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg) in file "phpthumb.class.php" on line 3152
[31] => empty $filename or GetImageSize(http://mywebsite.com/assets/images/stores/thisstore/test space issue.jpg) failed in file "phpthumb.class.php" on line 3201
[32] => Populating $rawimagedata in file "phpthumb.class.php" on line 3209
[33] => attempting ImageCreateFromStringReplacement($rawimagedata (13295 bytes), true) in file "phpthumb.class.php" on line 3215
[34] => ImageCreateFromStringReplacement() calling built-in ImageCreateFromString() in file "phpthumb.class.php" on line 3755
[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 "<!do" ( 0x3c 0x21 0x64 0x6f) in SourceImageToGD()[3444] in file "phpthumb.class.php" on line 3647
[39] => SourceImageToGD() failed in file "phpthumb.class.php" on line 323
)

@anselmh
Copy link

anselmh commented Mar 5, 2012

@pyrographics
Copy link
Author

Thank you for the link, this is the same issue that caused Rackspace Cloud to ratelimit one of our other sites a few weeks ago and took it down during peak usage. I can tell you it is not in the database because they only rolled back the site files from before the phpthumbof update. It was generating hundreds of megs of log data in a matter of seconds and throwing thumbnails everywhere in the file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants