0

i have this code to count number of pages

$image = new Imagick();
$image->pingImage('129820.pdf');
echo $image->getNumberImages();

i already have php_imagick.dll in xampp/php/ext and add extension=php_imagick.dll to php.ini

but i still get Error: Class Imagick not found

What should i do

Syed Waqas Bukhary
  • 5,130
  • 5
  • 47
  • 59
ohayou
  • 23
  • 3
  • Possible duplicate of [Where to find php\_imagick.dll for php 5.5.12 for Windows wampserver 2.5?](https://stackoverflow.com/questions/25766737/where-to-find-php-imagick-dll-for-php-5-5-12-for-windows-wampserver-2-5) – Syed Waqas Bukhary Mar 07 '18 at 04:52
  • have you checked the php_info if imagic is showing as extension? – Syed Waqas Bukhary Mar 07 '18 at 04:54
  • in php_info not showing the imagick – ohayou Mar 07 '18 at 08:27
  • It means that it is not installed. Follow the instructions posted in the above link and in the end check with phpinfo to see if it was successfully installed. Once you have it the phpinfo will have smthing like following https://i.stack.imgur.com/er8hR.png – Syed Waqas Bukhary Mar 07 '18 at 08:31
  • Unable to load dynamic library 'path/php_imagick.dll' -1% is not a valid Win32 application , i got this error after installed based on that post – ohayou Mar 07 '18 at 09:54
  • you have not downloaded the correct version for php 7, read the above link on how to download the correct version of php_imagick.dll. – Syed Waqas Bukhary Mar 07 '18 at 09:57
  • i've been download the correct version for php 7 – ohayou Mar 07 '18 at 10:58

0 Answers0