我需要在我的Apache-PHP 7.0服务器上安装Imagic扩展。我跟着这里非常好的导游:https://herbmiller.me/2016/06/16/installing-imagick-php-7/。基于" php -i"出:
PHP Version => 7.0.13
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x86
Thread Safety => enabled
extension_dir => D:\Program Files (x86)\PHP7\ext => D:\Program Files (x86)\PHP7\ext
我下载了文件
php_imagick-3.4.3rc4-7.0-ts-vc14-x86.zip
来自http://windows.php.net/downloads/pecl/releases/imagick/3.4.3rc4/的。我将所有DLL文件coppied到D:\ Program Files(x86)\ PHP7 \ ext并添加了
extension=php_imagick.dll
到我的PHP.INI。当我重新启动Apache时,未加载Imagic扩展,并且事件查看器显示2个相同的错误:
The description for Event ID 4 from source PHP-7.0.13 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
php[11628]
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Program Files (x86)\PHP7\ext\php_imagick.dll' - The specified module could not be found.
("d:\Program Files (x86)\Apache24\bin\httpd.exe" -k runservice)
拜托,有人可以告诉我,我做错了吗?
答案 0 :(得分:2)
这是我唯一能为我工作的教程:
https://tektriks.com/a-step-by-step-guide-on-how-to-install-imagemagick-in-windows/
我在Windows 7下使用PHP版本7.1.9和WampServer64。
答案 1 :(得分:0)
按照给定教程中的步骤进行操作:
https://herbmiller.me/2016/06/16/installing-imagick-php-7/
我下载的文件是 ImageMagick-6.9.3-7-vc14-x64.zip
http://windows.php.net/downloads/pecl/deps
将ImageMagick安装到您选择的目录
将整个bin目录从ImageMagick zip文件解压缩到您选择的目录。我选择了C:\ ImageMagick-6.9.3-7
然后设置系统环境变量并重新启动。
答案 2 :(得分:0)
按照https://mlocati.github.io/articles/php-windows-imagick.html
上的说明进行操作本质上:
答案 3 :(得分:-1)
这一步对我来说非常有效。 首先,从下面的链接下载。
-Install the ImageMagick PHP extension in Windows
从ImageMagick -.... zip提取到PHP根目录(其中 php.exe驻留)以DLL文件开头(并且有一个TON):
CORE_RL _
IM_MOD_RL _
将此行添加到您的php.ini文件中
extension=imagick
然后运行一个简单的测试(应该输出1):
php -r“ print(class_exists('imagick'));”
参考:
https://github.com/Imagick/imagick/issues/224#issuecomment-367532736