ImageMagick reads image, but imagick won't

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vanguy765

ImageMagick reads image, but imagick won't

Post by vanguy765 »

PHP Version 5.3.3
ImageMagick 6.6.6-0 2010-11-21 Q16
The version for imagick does not show with phpinfo().

I have imagick installed and working as far as I can tell running sample code using the default image 'magick:rose'. Except..

This does not work (php) using imagick
$im = new Imagick("rose2.jpg");

This does work (php) using ImageMagick
$image="rose2.jpg";

The time-out error using imagick includes
"The connection to the server was reset while the page was loading."

Phpinfo() lists:
upload_max_filesize = 32M
Post_max_size = 32M.
max_execution_time = 30
(rose2 is a copy of the stock rose image)

How do I get imagick to read the file?
Thanks in advance. :D
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: ImageMagick reads image, but imagick won't

Post by anthony »

Check the error logs from the PHP and IMagick!

For some PHP error log hints see this file in my Hints and Tips "tower"
http://www.ict.griffith.edu.au/~anthony ... /php.hints
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
vanguy765

Re: ImageMagick reads image, but imagick won't

Post by vanguy765 »

All error reporting for php is on. All errors to the webserver's log file.
Nothing strange in the webserver's log file, except the start-up reporting entries list php 5.3.1. But, phpinfo() reports php 5.3.3.

I don't know where to find the logs for IMagick!
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick reads image, but imagick won't

Post by Bonzo »

I would guess Imagick is not installed properly if its not showing on php.ini
This does work (php) using ImageMagick
$image="rose2.jpg";
All this is doing is reading the file name into a variable.

Try this error reporting after inserting you Imagick code.

Code: Select all

try
{
IMAGICK CODE
}

catch(Exception $e)
{
        echo $e->getMessage();
}

vanguy765

Re: ImageMagick reads image, but imagick won't

Post by vanguy765 »

The code does not get a chance to execute. The program times-out.

I'm using XAMPP 1.7.3 with php replaced with the latest CV9 version. IMagick! shows up in the output of phpinfo(), and ImageMagick (correct version) shows up as a line item of IMagick!

Installing IMagick! was just a case of copying a dll and modifying my php.ini, yes? To reinstall, are you suggesting that I find a fresh dll and try again?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: ImageMagick reads image, but imagick won't

Post by Bonzo »

The problem could be the dll; I use XAMPP and I think the dll I use is 5.2.4 but I am using XAMPP with PHP Version 5.2.9

I pressume you have restarted apache after modifying the php.ini file. I did the same as you put the dll in the specified path ( can not remember where it is now ) and modified the php.ini file.
vanguy765

Re: ImageMagick reads image, but imagick won't

Post by vanguy765 »

Yes, I have restarted Apache several times.

I got ImageMagic and IMagick! dll from Mikko’s blog (http://valokuva.org/?page_id=50). Is there another place to get the dll?

I had from Mikko’s blog: 2010-11-11 16:36 - php_imagick_ts.dll
I have now tried also: 2010-06-21 10:33 - php_imagick_ts.dll (with a server restart) with exactly the same results.

Thanks for your time.
Post Reply