johannes.jarolim.com/yapb-forum

Full Version: Local installation (MAMP): Thumbnail problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

i would like to test WordPress and yapb on my mac local.
So i've installed Wordpress and yapb unter MAMP on my local mac.

First if i inserted a picuture as new blog entry i just saw a little '?' instead of the picture.
Then i set the rights of the yapb "cache" folder to read/write for all.
Now, when i open the blog-site i get a long debug-list:

Code:
Thumbnail generation log
    1.    Image URI: /nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg
    2.    phpThumb->setSourceFilename(/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg)
    3.    phpThumb->config_document_root = /Applications/MAMP/htdocs
    4.    Parameters:
    5.    w = 200
    6.    thumbPath: /Applications/MAMP/htdocs/nsonic3/wp-content/plugins/yet-another-photoblog/cache/thumb.572db0b884ef7baac11f6eea3a0608c9.ebf486218337267c1b432845a3df25be.jpeg
    7.    phpThumb couldn't generate thumbnail.
    8.    phpThumb debug messages:
    •    phpThumb() v1.7.7-200612252156 in file "phpthumb.class.php" on line 216
    •    setSourceFilename(/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg) set $this->sourceFilename to "/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg" in file "phpthumb.class.php" on line 234
    •    file_exists() = 0 in file "phpthumb.class.php" on line 1036
    •    is_executable() = 0 in file "phpthumb.class.php" on line 1037
    •    ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned (no convert in /usr/bin /bin /usr/sbin /sbin) in file "phpthumb.class.php" on line 1066
    •    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 825
    •    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 835
    •    $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 852
    •    ResolveFilenameToAbsolute() prepending $this->config_document_root (/Applications/MAMP/htdocs) to $filename (/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg) resulting in ($AbsoluteFilename = "/Applications/MAMP/htdocs/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg") in file "phpthumb.class.php" on line 962
    •    $this->sourceFilename set to "/Applications/MAMP/htdocs/nsonic3/wp-content/uploads/2007/05/renovierung_01.jpg" in file "phpthumb.class.php" on line 754
    •    setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 859
    •    $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 895
    •    SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 2808
    •    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2665
    •    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    •    ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1739
    •    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2695
    •    SetOrientationDependantWidthHeight() starting with "3456"x"2304" in file "phpthumb.class.php" on line 2644
    •    SetOrientationDependantWidthHeight() setting w="200", h="0" in file "phpthumb.class.php" on line 2660
    •    EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2747
    •    image is 3456x2304 and therefore contains more pixels (7962624) than $this->config_max_source_pixels setting (1677722) in file "phpthumb.class.php" on line 2789
    •    starting SourceImageToGD() in file "phpthumb.class.php" on line 3005
    •    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    •    ImageMagickThumbnailToGD() aborting because ImageMagickCommandlineBase() failed in file "phpthumb.class.php" on line 1739
    •    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3046
    •    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3098
    •    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3100
    •    phpThumb() v1.7.7-200612252156 All attempts to create GD image source failed. ImageMagick is not installed (it is highly recommended that you install it). Source image is too large (3456x2304 = 8.0Mpx, max=1.7Mpx) for GD creation (either install ImageMagick or increase PHP memory_limit to at least 40M). in file "phpthumb.class.php" on line 3404
    •    phpThumb() v1.7.7-200612252156 Image is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting in file "phpthumb.class.php" on line 3404
    •    SourceImageToGD() failed in file "phpthumb.class.php" on line 312

What can i do?
Hi nSonic -

The last line in the log says it all:

Quote:Image is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting in file "phpthumb.class.php" on line 3404

Have a look at the according faq entry of phpThumb (the used thumbnail library):

Quote:Q: Some images generate thumbnails, but some fail (the original
non-resized image is output instead).
A: Your PHP installation does not have a high enough memory_limit
and ImageMagick is not installed on the server. The PHP memory
required is 5 times the number of pixels in the image.
For example:
640x480x5 = 1.5MB
1600x1200x5 = 9.2MB
You can adjust the PHP memory limit in php.ini (if you have
permission on your server to do so), or (better yet) install
ImageMagick on the server and that will bypass the memory limit
issue. If you can't do either of the above, you can resize the
images manually (with your favourite image editor) to a size
that your memory_limit setting can handle, and/or you can
re-save the images with an image editor that can embed an EXIF
thumbnail (Photoshop for example) which phpThumb can use as an
image source (lower image quality, but perhaps better than
nothing).

Hope that helps and
Greets from Salzburg!

Johannes
Johannes Wrote:Hi nSonic -

The last line in the log says it all:

Quote:Image is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting in file "phpthumb.class.php" on line 3404

Oh dear - how blind can one man be Confused
I've worked with very big photos and so it all makes sense. i've set the memory_limit to 64M and now it works just fine.

On the webserver its working great too. Thanks a lot.

I think i will come back with some more tricky questions and maybe one or two nice tricks i'm currently testing.

regards
nSonic
Reference URL's