Not able to get imagick working

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Not able to get imagick working

Postby TTR » 25. June 2010 12:03

I am running version 1.7.3 of xampp on the linux box (Ubuntu)

I installed imagemagick on the machine and also installed imagick for PHP (first Installed XAMPP's development package and then installed shared extension imagick using PECL)

The PHPInfo file shows that imagick is installed, when get_loaded_extensions() function in PHP shows that imagick is loaded but when it try to call imagick functions, it throws the errors.

Update: Some info on the issue:

PHP Version 5.3.0
imagick module version 2.3.0
ImageMagick version 6.5.7-10


I am not sure what could have gone wrong, please let me know if anyone knows the workaround or fix for this issue.

Thanks
TTR
TTR
 
Posts: 4
Joined: 25. June 2010 11:59

Re: Not able to get imagick working

Postby Nobbie » 25. June 2010 22:32

TTR wrote:it throws the errors.


Aha.

Very usefull description.
Nobbie
 
Posts: 8759
Joined: 09. March 2008 13:04

Re: Not able to get imagick working

Postby TTR » 26. June 2010 08:34

haha my bad, I forgot to mention there error in the post

I tried following sample test code:
Code: Select all
<?php
$im = new Imagick();
$im->newPseudoImage(100, 100, "magick:rose");
$im->setImageFormat("png");
$im->roundCorners(5,3);
$type=$im->getFormat();
header("Content-type: $type");
echo $im->getimageblob();
?>


And this is the error I am getting:
Fatal error: Uncaught exception 'ImagickException' with message 'Unable to set image format' in /opt/lampp/htdocs/test/magick.php:7 Stack trace: #0 /opt/lampp/htdocs/test/magick.php(7): Imagick->setimageformat('png') #1 {main} thrown in /opt/lampp/htdocs/test/magick.php on line 7


The same thing works on my remote server..
TTR
 
Posts: 4
Joined: 25. June 2010 11:59

Re: Not able to get imagick working

Postby Nobbie » 26. June 2010 11:54

Can you see in phpinfo() if "PNG" is supported by imagick?
Nobbie
 
Posts: 8759
Joined: 09. March 2008 13:04

Re: Not able to get imagick working

Postby TTR » 28. June 2010 09:02

Yes, you are right, just found that, it does not support JPG & PNG

But I am not sure how, I had installed it using a normal method i.e. did not specify the list of extensions / file types etc..

Do let me know if you come across any way to add more file types to it.

Thanks for the help.
TTR
 
Posts: 4
Joined: 25. June 2010 11:59

Re: Not able to get imagick working

Postby TTR » 28. June 2010 11:40

Finally, I was able to get it working.. I had to reinstall imagemagick with jpg and png deflates installed..

Once that was done, I just reinstalled imagick extension too..

And finally everything worked fine..

Thanks for the help.
TTR
 
Posts: 4
Joined: 25. June 2010 11:59


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests