0

Successfully install imagick into my system and able to loaded imagick extentsion (appears in phpinfo) but when running simple php command, such as php -v in my command prompt, it shows error

PHP Warning: PHP Startup: Unable to load dynamic library '[MY_SERVER_PATH]\PHP\ext\php_imagick.dll' - The specified module could not be found.

My system info as follows:

  • OS: Windows 10 Pro 64Bit
  • PHP: 5.6.19
  • ImageMagick: ImageMagick-6.9.4-10-Q16-x64-dll
  • PHP Imagick: php_imagick-3.3.0-5.6-ts-vc11-x64

My Error screenshot... I run print_r( get_loaded_extensions() ); and the result is:

Array ( [0] => Core 1 => bcmath [2] => calendar [3] => ctype [4] => date [5] => ereg [6] => filter [7] => ftp [8] => hash [9] => iconv [10] => json [11] => mcrypt [12] => SPL [13] => odbc [14] => pcre [15] => Reflection [16] => session [17] => standard [18] => mysqlnd [19] => tokenizer [20] => zip [21] => zlib [22] => libxml [23] => dom [24] => PDO [25] => openssl [26] => SimpleXML [27] => wddx [28] => xml [29] => xmlreader [30] => xmlwriter [31] => apache2handler [32] => curl [33] => fileinfo [34] => gd [35] => intl [36] => imap [37] => mbstring [38] => mysql [39] => mysqli [40] => Phar [41] => pdo_mysql [42] => soap [43] => xmlrpc [44] => imagick [45] => mhash )

I just dont understand why php command prompt always shows error.

P.S: I am not using any XAMPP or WAMPP packages...

update:

I wonder what extension that CLI loaded so i run a simple php script and this is the result:

D:>php -r "print_r( get_loaded_extensions() );"

Warning: PHP Startup: Unable to load dynamic library 'D:\Eric\web\PHP\ext\php_imagick.dll' - The specified module coul d not be found. in Unknown on line 0 Array ( [0] => Core [1] => bcmath [2] => calendar [3] => ctype [4] => date [5] => ereg [6] => filter [7] => ftp [8] => hash [9] => iconv [10] => json [11] => mcrypt [12] => SPL [13] => odbc [14] => pcre [15] => Reflection [16] => session [17] => standard [18] => mysqlnd [19] => tokenizer [20] => zip [21] => zlib [22] => libxml [23] => dom [24] => PDO [25] => openssl [26] => SimpleXML [27] => wddx [28] => xml [29] => xmlreader [30] => xmlwriter [31] => curl [32] => fileinfo [33] => gd [34] => intl [35] => imap [36] => mbstring [37] => mysql [38] => mysqli [39] => Phar [40] => pdo_mysql [41] => soap [42] => xmlrpc [43] => mhash )

Eric Lie
  • 1
  • 2
  • Most likely the CLI and the http module version of php use different `php.ini` configuration files. – arkascha Jun 26 '16 at 17:52
  • @arkascha I already make sure I edit the correct php.ini file that http module loaded. I am not sure if CLI has another version of php.ini since the result after running `php --ini` is: `Configuration File (php.ini) Path: C:\WINDOWS Loaded Configuration File: D:\Eric\web\PHP\php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)`
    I will try to search if CLI module uses another `php.ini` file
    – Eric Lie Jun 27 '16 at 00:35

0 Answers0