2

Trying to install imagemagick since 1.5 hrs but with no luck.

sudo apt-get install imagemagick php5-imagick

But nothing is happening. I tried to cross check with

if (!extension_loaded('imagick'))
    echo 'imagick not installed';

And it is returning the message, means not loaded. I have also tried to find imagick.so file path but that also couldn't find.

There is one imagemagick folder including some xml files. So my question is that is it all files of Imagemagick or something I am missing. Also do I need to add imagick.so in php.ini file?

Very confused, please help me

  • 1
    Is there no output at all when you run sudo apt-get install imagemagick? And what's the output of ls /usr/lib/php5/20121212/imagick.so? – Tobias Dec 12 '14 at 19:18
  • Try to install imagick with pear. – Aiphee Dec 12 '14 at 19:19
  • I got return value of the same path. So what I have to do now? Should I add this path to php.ini? – pixelngrain Dec 13 '14 at 5:35
  • Okay so I have added extension to php.ini on this path /etc/php5/apache2/php.ini and its loaded now. Checked with phpinfo() and I can see its there. Only one question. Did I edit right php.ini? because I have seen some post saying there are many php.ini so cli module should be added in /cli/php.ini but I have added in above path. So it is okay? – pixelngrain Dec 13 '14 at 5:52
17

try this:

sudo apt-get install php5-imagick
sudo php5enmod imagick
1

The following works for me...

The first installs ImageMagick on the server. The second installs the PHP 5 ImageMagick module. The third restarts your Apache configuration.

sudo apt-get install imagemagick
sudo apt-get install php5-imagick
sudo service apache2 graceful

UPDATE: Looking at your original question, you may need to simply run the last command to reload the Apache config file (or fully restart Apache).

0

I did the following steps worked for me:

php -v

PHP 5.5.9-1ubuntu4.17 (cli) (built: May 19 2016 19:08:09)


$sudo apt-get install php5 php5-common gcc
$sudo apt-get install imagemagick
$sudo apt-get install php5-imagick
$php -m | grep imagick
$service apache2 restart

Check the status by executing:

php -m | grep imagick
imagick

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.