snobu / php-imagick-webapps Goto Github PK
View Code? Open in Web Editor NEWImageMagick on App Service (Windows)
ImageMagick on App Service (Windows)
I have copied things over and I get imagick to work, but nothing I do gets PDF support. I've copied the GS libraries to a folder and added it to the path, but I don't know what else to do to tell ImageMagick about them. The phpinfo() dump does not show PDF or PDFA in the list of supported formats, even though the article (https://blogs.msdn.microsoft.com/azureossds/2015/12/07/php-imagemagick-on-azure-web-apps/) shows it in the screenshot. I know the GS DLL's themselves aren't redistributable, but if everything else was there along with an empty folder saying "GS LIBRARIES HERE" it would really make a difference!
I installed the WordPress on Azure Web App with extension PHP7_64BIT_IMAGICK_6937.
Php version is 7.3.3.
Platform : 64bit
Managed pipeline: Integrated
HTTP Ver: 2.0
Web Socket: On
Always On: On
ARR: On
I read this block is inserted automatically in applicationHost.xdt
<runtime xdt:Transform="InsertIfMissing"> <environmentVariables xdt:Transform="InsertIfMissing"> <add name="Path" value="%Path%d:\home\site\imagick\;" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" /> <add name="MAGICK_HOME" value="d:\home\site\imagick\" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" /> <add name="MAGICK_CODER_MODULE_PATH" value="d:\home\site\coders\" xdt:Locator="Match(name)" xdt:Transform="InsertIfMissing" /> </environmentVariables> </runtime>
And the dll path is listed in php70_64.ini.
But the wordpress Site Health status still reports:
The optional module, imagick, is not installed, or has been disabled.
Any idea?
Thanks.
I just released a PowerShell module that can automatically download and install imagick on Windows.
Here's a sample PowerShell session:
PS C:\> Install-Module PhpManager -Scope CurrentUser -Force
PS C:\> Install-PhpExtension -Extension imagick -Path C:\Dev\PHP5.6.5
Downloading PECL package imagick 3.4.3 from https://windows.php.net/downloads/pecl/releases/imagick/3.4.3/php_imagick-3.4.3-5.6-ts-vc11-x86.zip
Installing new extension 'imagick' version 3.4.3
Checking prerequisites for imagick
Downloading and extracting https://windows.php.net/downloads/pecl/deps/ImageMagick-6.9.3-7-vc11-x86.zip
The extension imagick v3.4.3 has been enabled
PS C:\> Get-PhpExtension -Path C:\Dev\PHP5.6.5 | Where-Object { $_.Name -eq 'imagick' }
Type : Php
State : Enabled
Name : imagick
Handle : imagick
Version : 3.4.3
Filename : C:\Dev\PHP5.6.5\ext\php_imagick.dll
(for PHP 7.2 you have to add -MinimumStability snapshot
to the Install-PhpExtension
command)
Please update to work with latest Azure PHP 7.0 and latest stable imagick
After copying files from "site" directory to a new Azure Web App, and setting variables as per screenshot.
test.php does not work.
PHP Fatal error: Uncaught exception 'ImagickException' with message 'unable to open module file `D:\home.magick\IM_MOD_RL_png_.dll': No such file or directory @ warning/module.c/GetMagickModulePath/812' in D:\home\site\wwwroot\test.php:20
Stack trace:
#0 D:\home\site\wwwroot\test.php(20): Imagick->setimageformat('png')
#1 {main}
thrown in D:\home\site\wwwroot\test.php on line 20
I use ImageMagick-6.9.8-3-Q16-x86-dll and when I try to display an image in the png format, I get the following error
UnableToLoadModule 'D:\home\site\imagick\coders\IM_MOD_RL_png_.dll': The specified procedure could not be found. @ error/module.c/OpenModule/1282
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.