Install imagick to azure

我是研究僧i 提交于 2021-01-29 03:04:46

问题


I tried to install Image magick for php on azure web app.

I used the guideline - https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/.

I tried to follow it step by step but it didn't work.

I got this error:

Class 'Imagick' not found in ...

I used the .dll from https://pecl.php.net/package/imagick/3.1.2/windows


回答1:


Please upload phpinfo.php file to azure website to test whether the imagick extension has been installed, like the following screenshot:

I have use a custom PHP runtime to install this extension successfully, the article you provide is a good resource, please have a look at this part: "How to: Use a custom PHP runtime", you need to pay attention to the following:

1) please download the no thread safe version at: https://pecl.php.net/package/imagick/3.1.2/windows, and also need to match the PHP version

2) If use your customer PHP runtime, please don't forget to change the extension dir path.

3) please copy the php_imagick.dll to the ext folder and other 8 dlls in the php folder




回答2:


I found from lots of digging, articles and posts that not all imagick libraries are compatible for installation here. The dlls which worked for me on PHP 5.6 were from http://windows.php.net/downloads/pecl/releases/imagick/3.3.0rc2/php_imagick-3.3.0rc2-5.6-nts-vc11-x86.zip. I later wrote about it describing the exact steps which worked for me at http://techblog.saurabhkumar.com/2015/12/setting-up-imagemagick-for-php-on-azure.html



来源:https://stackoverflow.com/questions/31701041/install-imagick-to-azure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!