Download the Azure SDK for PHP

Overview

The Azure SDK for PHP includes components that allow you to develop, deploy, and manage PHP applications for Azure. Specifically, the Azure SDK for PHP includes the following:

  • The PHP client libraries for Azure. These class libraries provide an interface for accessing Azure features, such as data management services and cloud services.
  • The Azure Command-Line Interface for Mac, Linux, and Windows (Azure CLI). This is a set of commands for deploying and managing Azure services, such as Azure Websites and Azure Virtual Machines. The Azure CLI work on any platform, including Mac, Linux, and Windows.
  • Azure PowerShell (Windows Only). This is a set of PowerShell cmdlets for deploying and managing Azure Services, such as Cloud Services and Virtual Machines.
  • The Azure Emulators (Windows Only). The compute and storage emulators are local emulators of cloud services and data management services that allow you to test an application locally. The Azure Emulators run on Windows only.

The sections below describe how to download and install the components described above.

The instructions in this topic assume that you have PHP installed.

Note

You must have PHP 5.5 or higher to use the PHP client libraries for Azure.

PHP client libraries for Azure

The PHP Client Libraries for Azure provide an interface for accessing Azure features, such as data management services and cloud services, from any operating system. These libraries can be installed via the Composer.

For information about how to use the PHP Client Libraries for Azure, see How to Use the Blob Service, How to Use the Table Service and How to Use the Queue Service.

Install via Composer

  1. Install Git.

    [AZURE.NOTE] On Windows, you will also need to add the Git executable to your PATH environment variable.

  2. Create a file named composer.json in the root of your project and add the following code to it:

     {
         "require": {
             "microsoft/windowsazure": "^0.4"
         }
     }
    
  3. Download composer.phar in your project root.
  4. Open a command prompt and execute this in your project root

     php composer.phar install
    

Azure PowerShell and Azure Emulators

Azure PowerShell is a set of PowerShell cmdlets for deploying and managing Azure Services (such as Cloud Services and Virtual Machines). The Azure Emulators are emulators of cloud services and data management services that allow you to test an application locally. These components are supported Windows only.

The recommended way to install Azure PowerShell and the Azure Emulators is to use the Microsoft Web Platform Installer. Note that you can also choose to install other development components, such as PHP, SQL Server, the Microsoft Drivers for SQL Server for PHP, and WebMatrix.

For information about how to use Azure PowerShell, see How to Use Azure PowerShell.

Azure CLI

The Azure CLI is a set of commands for deploying and managing Azure services, such as Azure Websites and Azure Virtual Machines. For information about installing Azure CLI, see Install the Azure CLI.

Next steps

For more information, see the PHP Developer Center.