Microsoft Azure Open Source Development Support Team Blog

Support for Open Source Technologies on Microsoft Azure App Service

Use JpGraph library with Azure Web App

JpGraph is a graph creating library for PHP5 and PHP7.0. The library is completely written in PHP and ready to be used in any PHP app. Here is a demo how to use it with web app on azure App Services. 1. Download JpGraph PHP5 and PHP7 version from (Pro. version require license) 2. After downloading… 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 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> 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>, 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, . Find the correct php.ini from “D:\local\Config\PHP-xxx\php.ini, copy… 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

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

Setup Single Sign On with AAD using SimpleSAMLphp

This blog provides step-by-step instruction on how to setup Single Sign On with Azure AD using SimpleSMPLphp API (apply to MediaWiki site as an example). Install and configure SimpleSAMLphp To download SimpleSAMLphp, , extract the download to wwwroot/simplesamlphp Configure admin: Edit wwwroot/simplesamlphp/config/config.php,            – Modify baseurlpath:       ‘baseurlpath’  => ‘simplesamlphp/www/’            – Set admin login passwoed:    … Read more

Azure SDK for PHP: Updating Blob Properties

Here is sample code to update Blob Properties using Azure SDK for PHP. This code will traverse through all the blobs within the specified container and update the cache-control to “public, max-age=604800”. define(“__BLOBNAME__”, “name”); define(“__CONTAINERNAME__”, “container”); define(“__BLOBKEY__”, “key”); require_once(‘WindowsAzure\WindowsAzure.php’); use WindowsAzure\Common\ServicesBuilder; use WindowsAzure\Common\ServiceException; use WindowsAzure\Common\CloudConfigurationManager; use WindowsAzure\Blob\Models\Block; use WindowsAzure\Blob\Models\CreateContainerOptions; use WindowsAzure\Blob\Models\ListContainersOptions; use WindowsAzure\Blob\Models\CreateBlobOptions; use WindowsAzure\Blob\Models\CommitBlobBlocksOptions;… Read more

Access Oracle Databases from Azure Web Apps using OCI8 drivers with PHP

You can connect to different databases (MySQL, PostgresDB, MongoDB, MSSQL Server) from Azure Web Apps with PHP. But connecting to Oracle database is not provided by default, as this requires Oracle native client. We cannot install full blown Oracle client, but you can install Oracle instant client and connect to your Oracle databases OCI drivers… Read more

PHP ImageMagick on Azure Web Apps

This post is outdated. See alternatives: PHP 7 x64 ImageMagick Site Extension. This can be installed through the Azure Portal or the SCM/Kudu > SiteExtensions area. for PHP 7.0 steps.       While this post is outdated, the steps to enable this SiteExtension is still helpful. Not all versions of the Windows Application… Read more