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

iftekhs's avatar
Level 13

PHP Startup: Unable to load dynamic library 'imagick'

Hi, I have successfully installed Imagick on my xampp PHP and in phpinfo it is showing me the extension. but when I start laravel server it gives me this error -> PHP Startup: Unable to load dynamic library 'imagick' (tried: C:\xampp\php\ext\imagick (The specified module could not be found), C:\xampp\php\ext\php_imagick.dll I installed it because i'm using this package -> simplesoftwareio/simple-qrcode which requires Imagick in some cases. I also tested Imagick on native PHP and it's working. Any idea how to solve this?

0 likes
4 replies
Sinnbeck's avatar

start laravel server

You mean php artisan serve? Be sure that it's loaded for both the web version and cli version of php

iftekhs's avatar
Level 13

@Sinnbeck yes. And how can I make sure that? I also tried using it on a simple index.php file and it is working fine. I can see the Imagick extension on phpinfo. I made a file and opened it using xampp which had this ->

 var_dump(class_exists(Imagick::class));

and it returned true. but when i try it on laravel it dosent work!

iftekhs's avatar
Level 13

@Sinnbeck I tried this ->

php -S localhost:8003

and it is working. it's just not working in laravel!

iftekhs's avatar
iftekhs
OP
Best Answer
Level 13

I closed all the command line windows and restarted everything and it's working now.

Please or to participate in this conversation.