Finding Correct Version of PHP Extension for Azure Web Site

1 minute read

While working with websites on Azure, sometimes you may need to install additional extensions. It is important to find the right extension that matches the PHP running on Azure website. PHP function “phpinfo()” collects PHP version and runtime environment information, you can call the function in code (<?php phpinfo();  ?>), (to quickly get the same information, you can run “php -I” from command line), for example,

PHP version is 5.5.18 in this example. Since extension .dll files could be compiled by different C++ compiler, the compiler version should be matching, in this example, it is MS VC11. The last one is Architecture information, in this example it is x86.

Further more, you can find PHP (and Zend) extension build is NTS (Non-Thread Safe).

From, find the matching PHP version in nts (Non-Thread Safe ), download and decompress the  .zip file, core extensions are listed in /ext, get the one you need from there.

In the case the functionality you need is not available in core extensions, you will find and download the extension from PECL (PHP Extension Community Library), versions should be matched in the same way.

For more details about how to add customer PHP extensions on Azure web site, refer to these documents: