Free trial *Internet Service Required

Download the Windows Azure SDK for PHP

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

  • The PHP client libraries for Windows Azure. These class libraries provide an interface for accessing Windows Azure features, such as data management services and cloud services.
  • The Windows Azure Command-Line Tools for Mac and Linux. This is a set of command-line tools for deploying and managing Windows Azure services, such as Windows Azure Web Sites and Windows Azure Virtual Machines. These tools work on any platform, including Mac, Linux, and Windows.
  • Windows Azure PowerShell (Windows Only). This is a set of PowerShell cmdlets for deploying and managing Windows Azure Services, such as Cloud Services and Virtual Machines.
  • The Windows 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 Windows 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.3 or higher to use the PHP client libraries for Windows Azure.

PHP client libraries for Windows Azure

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

For information about how to use the PHP Client Libraries for Windows 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.

    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": "*"
        },          
        "repositories": [
            {
                "type": "pear",
                "url": "http://pear.php.net"
            }
        ],
        "minimum-stability": "dev"
    }
  3. Download composer.phar in your project root.

  4. Open a command prompt and execute this in your project root

    php composer.phar install

Install as a PEAR package

To install the PHP Client Libraries for Windows Azure as a PEAR package, follow these steps:

  1. Install PEAR.
  2. Set-up the Windows Azure PEAR channel:

    pear channel-discover pear.windowsazure.com
  3. Install the PEAR package:

    pear install pear.windowsazure.com/WindowsAzure-0.3.1

After the installation completes, you can reference class libraries from your application.

Install manually

To download and install the PHP Client Libraries for Windows Azure manually, follow these steps:

  1. Download a .zip archive that contains the libraries from GitHub. Alternatively, fork the repository and clone it to your local machine. (The latter option requires a GitHub account and having Git installed locally.)

    Note

    The PHP Client Libraries for Windows Azure have a dependency on the HTTP_Request2, Mail_mime, and Mail_mimeDecode PEAR packages. The recommended way to resolve these dependencies is to install these packages using the PEAR package manager.

  2. Copy the WindowsAzure directory of the downloaded archive to your application directory structure and reference classes from your application.

Windows Azure PowerShell and Windows Azure Emulators

Windows Azure PowerShell is a set of PowerShell cmdlets for deploying and managing Windows Azure Services (such as Cloud Services and Virtual Machines). The Windows 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 Windows Azure PowerShell and the Windows 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 Windows Azure PowerShell, see How to Use Windows Azure PowerShell.

Windows Azure Command-Line Tools for Mac and Linux

The Windows Azure Command-Line Tools for Mac and Linux are a set of command-line tools for deploying and managing Windows Azure services, such as Windows Azure Web Sites and Windows Azure Virtual Machines. The following list describes how to install the tools, depending on your operating system:

For information about how to use the Windows Azure Command-Line Tools for Mac and Linux, see How to Use the Command-Line Tools for Mac and Linux.

Rss Newsletter