0

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.

  1. I went to this web-page to get the right zips to download: https://mlocati.github.io/articles/php-windows-imagick.html
  2. phpinfo() says I'm running PHP 7.3.3 x64 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
  3. I extracted the two zip files into their own respective subdirectories in D:\home\site\ext directory.
  4. I created an empty file at D:\home\site\ext\extensions.ini.
  5. In the Azure App Service configuration area, I added the environment variable PHP_INI_SCAN_DIR=D:\home\site\ext\.
  6. 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.
  7. Then I restarted the Azure App Service. Since then PHP crashes immediately on startup.
  8. 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 running php -f phpinfo.php > out.txt 2> err.txt gives me zero-byte files out.txt and err.txt).
    • My global php.ini already has display_errors = On and display_startup_errors = On.
  9. Nothing is logged anywhere in Azure other than that the FastCGI Extension exited unexpectedly.
  10. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.