0

I have set up imageMagick on my windows machine with WAMP. I'm trying to convert a pdf to jpg and via the command prompt everything works fine. If I run the php script, I get the following error.

( ! ) Fatal error: Uncaught exception 'ImagickException' with message 'unable to load module `C:\imagemagick\IM_MOD_RL_PDF_.dll' in D:\wamp\www\docms\aaaapdf\sample.php on line 2

( ! ) ImagickException: unable to load module `C:\imagemagick\IM_MOD_RL_PDF_.dll': The specified procedure could not be found. @ error/module.c/OpenModule/1277 in D:\wamp\www\docms\aaaapdf\sample.php on line 2

I think this might have something to do with environment variables. Any suggestions?

SeraZheng
  • 187
  • 8
user5349142
  • 117
  • 2
  • 12
  • Please check this: https://www.devside.net/wamp-server/installing-and-using-imagemagick-with-imagick-php-extension-php_imagick-dll-on-wamp – Julian Jan 14 '16 at 11:58
  • Thanks but imagmagick already loads in phpinfo. I still get the same error – user5349142 Jan 15 '16 at 05:54
  • At phpinfo you can see the row: "ImageMagick supported formats", pdf is probably not supported over there. – Julian Jan 15 '16 at 08:44
  • Duplicate question: http://stackoverflow.com/questions/33078829/imagickunabletoloadmodule – Julian Jan 15 '16 at 08:47
  • Another useful link: http://forum.wampserver.com/read.php?2,125599,125615 – Julian Jan 15 '16 at 09:05
  • Everything was set but it didnt work so I just ran the command with exec() through php and got the result I was looking for. Thanks – user5349142 Jan 19 '16 at 05:55
  • I would also recommend switching to a Linux environment because the installation for Imagick is easier. – Julian Jan 19 '16 at 11:20

0 Answers0