MagickWand for PHP does not produce any outputs

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ridera

MagickWand for PHP does not produce any outputs

Post by ridera »

MagickWand for PHP goes thru the motions; but, doesn't produce any outputs, no echo blobs, write files, or even reporting the width and height.

e.g., Here is a very simple example. The width and height are empty. flower_original.jpg is legit, It works fine with the old PHP imagemagick functions and it is a good jpeg.

Code: Select all

       $resource = NewMagickWand();
       $org_image= getcwd() . '/flower_original.jpg';  //also tried without full path;  

//Simple test to see if generally working
	
	MagickReadImage( $resource, $org_image);

echo 'Error report 1 => ' . MagickGetExceptionString($resource) . "<br><br>\n\n";

	$width = MagickGetImageWidth( $resource );
	$height = MagickGetImageHeight( $resource );

echo 'Error report 2 => ' . MagickGetExceptionString($resource) . "<br><br>\n\n";

	echo "Image size, in pixels, is:  width $width x height $height <br><br>\n\n";
Both exception strings are empty. However, if I force an error, e.g., name the image to a non existing file, I get

Code: Select all

Error report 1 => unable to open image `/home/ridera/public_html/imagemagick/xflower_original.jpg': No such file or directory

Error report 2 => Wand contains no images `MagickWand-2'
PHP5.2.3; MagickWand 1.0.4; ImageMagick 6.3.5 08/04/07 Q16
ridera

Re: MagickWand for PHP does not produce any outputs

Post by ridera »

An update.

These functions work.
MagickDescribeImage($resource)
MagickGetImageResolution($resource)
Shrek

Re: MagickWand for PHP does not produce any outputs

Post by Shrek »

I've been suffering the same problem on

MagickWand1.0.4 & ImageMagick 6.3.5 08/14/07 Q16
andrabr

Re: MagickWand for PHP does not produce any outputs

Post by andrabr »

any solutions?

- I am having exactly same problem.

My theory so far is that MagickWand is NOT talking to ImageMagick - the only functions we have working are the ones with default outputs...
andrabr

Re: MagickWand for PHP does not produce any outputs

Post by andrabr »

Partial Solution: downgrade.

1) Remove ImageMagic 6.3.5 ( make uninstall)

2) Install ImageMagic 6.3.4.10

3) Get confused: MagickWand for PHP will tell you that you are running ImageMagick 6.3.4 but it needs version 6.3.4 or above. Yep, I went nuts too...

A closer look at "configure" showed that it actually specifies 6.3.5 as a requirement (internally). I wish I knew WHICH 6.3.5 !!! - 6.3.5.6 does NOT work.
It has been reported that 6.3.5.2 does not work either.

Help???
Is there a combination of versions known to work?
slitz

Re: MagickWand for PHP does not produce any outputs

Post by slitz »

i'm exactly in same situation...

well, at least now i know why the strange confgure behavior when with imagemagick 6.3.4 installed , that got me really puzzled :?

anyway, i'm using MagickWand 1.0.4 on mac osX 10.4 and imagemagick 6.3.5 Q16...
ali

Re: MagickWand for PHP does not produce any outputs

Post by ali »

hi, i got it to work... first, i installed the newest Imagemagick release, then compiled php5 with magickwand. the compiling worked fine!
but this configuration isnt fine, the problem is the imagemagick v6.3.5! so i uninstalled imagemagick, and installed then ImageMagick-6.3.4-10, aaand, it works :D

i doesnt tested it enough, but saving images, and echo blobs working!!

so, what have you to do?

  • Install ImageMagick-6.3.5-6
  • Compile php5 with magickwand, it will work with this imagemagick version
  • Uninstall ImageMagick-6.3.5-6 (make uninstall)
  • Install ImageMagick-6.3.4-10
  • Restart Apache (in my case)
thats all! it isnt the best way, but i think its for NOW the only way...
Post Reply