Microsoft Azure Open Source Development Support Team Blog

Support for Open Source Technologies on Microsoft Azure App Service

Increase Import Max File Size for PHPMyAdmin – Azure App Service

  When using PHPMyAdmin via SiteExtension or with MySQL in-app on Azure Web Apps, the maximum upload size when Importing a SQL file is set to 8,192KiB.  This is due to the default upload_max_filesize and post_max_size for PHP on Azure Web Apps.  To increase the value, you’ll need to modify both the local and master… Read more

How to enable PHP LDAP in Azure Web Apps

PHP LDAP extension is not enabled by default in Azure Web App, you need the following steps: How to enable extensions in the default PHP runtime Go to https://portal.azure.com Select your web app and go to App Settings Add an app setting called PHP_INI_SCAN_DIR with value d:\home\site\ini Go to Kudu Console https://<yourwebappname>.scm.azurewebsites.net/DebugConsole Navigate to site… Read more

Steps to Enable Xdebug for PHP Profiling 

By Yi Wang and Mangesh Sangapu Find the matching version of xdebug extension from “D:\devtools\xdebug\2.4.0\”,for example, if you have PHP 5.6, use “D:\devtools\xdebug\2.4.0\php_5.6\php_xdebug-2.4.0-5.6-vc11-nts.dll”. To access D: drive, use Kudu <your-website-name>.scm.azurewebsites.net, or “Advanced Tools” in Azure portal, Add Xdebug extension in Application Settings->App settings: PHP_ZENDEXTENSIONS = D:\devtools\xdebug\2.4.0\php_5.6\php_xdebug-2.4.0-5.6-vc11-nts.dll  Create Xdebug profile output directory “D:\home\site\wwwroot\bin\xdebug_profiles” Create “D:\home\site\wwwroot\.user.ini”, add follow… Read more

Install ionCube Loader extension for PHP site on Azure App

As required by this extension, ionCube should be the first Zend extension installed before any other Zend extensions. Simply adding PHP extension in application Settings could not meet this requirement. In this case, we need to edit php.ini, here are the steps: Follow this link to create custom php.ini, https://github.com/projectkudu/kudu/wiki/Xdt-transform-samples#using-a-custom-phpini . Find the correct php.ini from “D:\local\Config\PHP-xxx\php.ini, copy… Read more

Best Practices for WordPress Security on Azure

WordPress Security is often an overlooked feature. Customers are quick to configure their site, but often forget to fine tune the security aspect. Here we have compiled steps that will help make your WordPress site more robust on Azure. More information can also be found at the official WordPress.org site: https://codex.wordpress.org/Hardening_WordPress 1) wp-config.php Customize and modify… Read more

WordPress Tools and MySQL Migration with WordPress Buddy+

WordPress Buddy+ is an Azure Web Apps Site Extension that facilitates WordPress configuration and especially useful for WordPress migrations. It has features for updating HOME and SITE_URL, viewing list of plugins and updating passwords. In addition, it can also help migrate the MySQL database, whether it be MySQL In-App, ClearDB or on a Virtual Machine… Read more

Running Python Webjob on Azure App Services using non-default python version

You can run programs or scripts in WebJobs in your Azure App Service web app in three ways: on demand, continuously, or on a schedule. There is no additional cost to use WebJobs. This article shows how to run Python Webjob on Azure App Services using non-default python version. we would follow below list of… Read more

MySQL In-App Configuration for PHP Content Management Systems

Read more about MySQL In-App here. Content Management Systems such as WordPress, Drupal, Joomla contain the database credentials within a configuration file. If you decide to use MySQL In-App for development purposes, you will quickly realize that you need to modify these credentials to work with MySQL In-App. Below is a table containing the default… Read more

Use IIS AppInit Module to Clear Cache on Local Disks for Multiple Instances on Azure Web Apps

A solution to increase PHP Performance for MVC Frameworks (ex: CodeIgniter, Symfony, Laravel, etc.) is to save the cache to local disk. Since the cache is saved locally to the VM, there will be an improved performance boost. However, this raises a couple of questions: How can cache be cleared from the local disk? And… Read more

How to identify/review PHP errors on Azure Web Apps using Log Stream service

If you are getting internal server errors (HTTP error 500) trying to request your PHP application inside Azure Web Apps, You can do the following: 1.- Create .user.ini file and set log_errors = on to check if there a php error related, following this reference from step 1 to 4: Login PHP errors 2.- But sometimes there are not php errors… Read more