Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sayjoy's avatar

ImageMagic Magic Module not available Even when phpinfo shows that imagick is installed

Hello, Am trying to use intervention image with imagick driver but keep getting the error:

Intervention \ Image \ Exception \ NotSupportedException ImageMagick module not available with this PHP installation.

Here is my code: Qr::size(500)->generate($in, 'qrs/'.$in.'.svg'); Image::configure(array('driver' => 'imagick')); $qr = Image::make(public_path('qrs/'.$in.'.svg')); $qr->text("Serial No: ".$in);

I have also ran this on artisan:

php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"

Thanks for your help in advance.

0 likes
9 replies
rdelorier's avatar

If it's installed already you may just need to restart php-fpm.

Sayjoy's avatar

@RDELORIER - HOw do I do this? I am in a development environment and using wamp server. I have restarted the wamp server several times and even restart the system too, but to no effect.

rdelorier's avatar

@SAYJOY - you can display the php info in the browser to see all the details

<?php
phpinfo(); die;

Try throwing that at the top of public/index.php. the problem may be that php-cli and php-fpm are using different ini files, if thats the case then just edit the ini files you see in the output from the above suggestion and enable the module there.

Sayjoy's avatar

Thank rdelorier.

Trying phpinfo from index file does not show imagick module, but trying it from the root folder (www folder in wamp) shows imagick.

Path to php.ini from phpinfo in public/index.php is C:\wamp64\bin\php\php7.3.0\php.ini - When I open this file the following message was right at the top:

DO NOT EDIT THIS FILE **** DO NOT EDIT THIS FILE ****** ; * This file is only use by PHP CLI (Command Line Interface) * ; * that is to say by Wampserver internal PHP scripts * ; * THE CORRECT FILE TO EDIT is Wampmanager Icon->PHP->php.ini * ; * that is wamp/bin/apache/apache2.x.y/bin/php.ini

I still edited anyway, by adding the following lines:

extension=php_imagick.dll

extension = imagick.so

But it did not work.

The Path to php.ini from phpinfo in www folder however is: C:\wamp64\bin\apache\apache2.4.23\bin\php.ini

Is there anyway I can set the path of the php.ini used by laravel to the latter?

Sayjoy's avatar

Also, php cli crashes whenever I tried coping the php.ini from C:\wamp64\bin\apache\apache2.4.23\bin\ to C:\wamp64\bin\php\php7.3.0.

It brings me to another question:

  • Why does php.ini exist in two locations?

  • Is there a way to tell artisan serve to use C:\wamp64\bin\php\php7.3.0\php.ini ?

Sayjoy's avatar

I had to change my development environment to xampp and install imagick. Thanks for your support.

Aq1's avatar

Hi. I'm working on a two step google authentication feature. I've used these two packages pragmarx/google2fa-laravel and bacon/bacon-qr-code. I did the implementation on localhost and I received an error in the barcode page "You need to install the imagick extension to use this back end" , so I installed the imagick in my application and included .dll files in C:\xampp\apache\bin . By doing so, my errors were resolved and the authentication was working fine on localhost. Now I've implemented the project on live. But again I'm getting this error "You need to install the imagick extension to use this back end"..

I need help to install imagick on my server. Any ideas?

Please or to participate in this conversation.