I'm trying to install ImageMagick on an Azure App Service instance running WordPress. The Azure App Service is running PHP 7.3.3 x64 otherwise fine.
- I went to this web-page to get the right zips to download: https://mlocati.github.io/articles/php-windows-imagick.html
phpinfo()
says I'm running PHP 7.3.3x64
MSVC15
non-thread-safe, so I downloaded:php_imagick-3.4.3-7.3-nts-vc15-x64.zip
ImageMagick-7.0.7-11-vc15-x64.zip
- I extracted the two zip files into their own respective subdirectories in
D:\home\site\ext
directory. - I created an empty file at
D:\home\site\ext\extensions.ini
. - In the Azure App Service configuration area, I added the environment variable
PHP_INI_SCAN_DIR=D:\home\site\ext\
. - In
extensions.ini
I put this single line:extension=D:\home\site\ext\php_imagick-3.4.3-7.3-nts-vc15-x64\php_imagick.dll
. - Then I restarted the Azure App Service. Since then PHP crashes immediately on startup.
To investigate I opened Kudu and ran the PHP command-line interface from the
wwwroot
directory:cd D:\home\site\wwwroot\ php -f phpinfo.php
- This causes PHP to crash immediately. It writes nothing to standard-output nor
stderr
(so runningphp -f phpinfo.php > out.txt 2> err.txt
gives me zero-byte filesout.txt
anderr.txt
). - My global
php.ini
already hasdisplay_errors = On
anddisplay_startup_errors = On
.
- This causes PHP to crash immediately. It writes nothing to standard-output nor
- Nothing is logged anywhere in Azure other than that the FastCGI Extension exited unexpectedly.
- After commenting out the
#extension=D:\home\site\ext...
line PHP works fine.
I'm assuming this might be an issue with a missing system dependency (such as VisualC++ Redistributables) but Azure claims all current VisualC++ Redistributables are pre-installed (and we can't install our own anyway).
Is there any way to investigate a process-crash-on-startup?
I know one option is WinDbg, but I don't know how to get a crash dump in an Azure App Service.
0 Answers