Home | Setup Guide | Deployment Guide | Advanced Features

Setup Guide



ENVIRONMENT REQUIREMENTS

To use Windows Azure Command-Line Tools for PHP Developers, it requires the following:
  1. Windows 7, Windows Server 2008 or Windows Vista SP1
  2. Windows Azure Software Development Kit (February 2010 or later)
    1. Download
  3. PHP 5.2.11 (or above) Binary
    1. Download
    2. PHP extensions phpzip.dll and phpcurl.dll to be included.


INSTALLATION OF WINDOWS AZURE

There are two ways to develop applications in Windows Azure: locally on a developer's machine or on the Windows Azure production environment. This command-line tool will package and deploy user provided PHP sources locally on the developer's machine.

Please note that the Windows Azure SDK is only supported upon the Windows platform.

Go to this link to install Windows Azure Software Development Kit: Download


INSTALLATION OF PHP WINDOWS BINARIES

To run this command-line tool and to be provide with packaging PHP web application for Windows Azure deployment requires PHP 5.2.11 (or above) Windows binaries, which is available here: Download

To tool needs PHP runtime in two different modes:
  1. To run this tool to perform packaging and running within Development Fabric.
  2. To be packaged with PHP web application required for deployment to Windows Azure.

Each need could be two different PHP runtimes. For example, assume that the user's PHP runtime is at "C:\Project Files\PHP\", and to provide PHP runtime for packaging requires calling parameter --phpRuntime (-r).

This command uses the same PHP runtime for both running tool and packaging, "C:\Project Files\PHP\":

php package.php --project=MyProject --phpRuntime="C:\Project Files\PHP\"

This command uses two different PHP runtimes for running tool ("C:\Project Files\PHP\") and packaging ("..\PHP\"):

php package.php --project=MyProject --phpRuntime="..\PHP\"


PHP EXTENSIONS

This section will cover which PHP Extensions are required and optional.

It is absolutely essential that all added PHP extensions into PHP runtime's \ext directory are:
  • Same compile version, VC6 or VC9
  • Same PHP binary version: 5.2.11+ or 5.3.x
  • Same thread-safety

Setup of PHP extensions will include:
  • Modifying PHP runtime's php.ini file to enable extensions.
  • Add or Validating PHP extensions within PHP runtime's \ext directory.


Overview

PHP Extension Necessity Purpose Used By Location
php_zip.dll Required Zip File functions Command-line Tool to extract contents from ZIP file. Available with PHP Windows Binary ZIP or Added by PHP Windows Install if specifically requested by user.
php_curl.dll Required CURL, Client URL library functions Packaging Windows Azure SDK for PHP Developers within Web Role. Available with PHP Windows Binary ZIP or Added by PHP Windows Install if specifically requested by user.
php_azure.dll Optional Used to access ServiceConfiguration and logging from a Windows Azure PHP application Packaging within Web Role's PHP runtime. Download
php_sqlsrv.dll Optional The SQL Server Driver for PHP is a PHP 5 extension that allows for the reading and writing of SQL Server data from within PHP scripts. Packaging within Web Role's PHP runtime. Download
php_wincache.dll Optional The Windows Cache Extension for PHP is a PHP accelerator that is used to significantly increase the execution speed of PHP scripts on the Windows Operating System. Packaging within Web Role's PHP runtime. Download


Required for Running Command-Line Tool


php_zip.dll

This command-line tool requires PHP extension php_zip.dll. Within the PHP runtime that will be used to execute this tool, validate that this extension is within PHP runtime's \ext directory.

If php_zip.dll is not within PHP runtime's \ext directory and user had installed this PHP runtime using PHP Windows installer, then the user will need to re-install their PHP runtime and select adding "Zip" extension.

NOTE: If user is planning to use this same PHP runtime is to be provided to this tool for packaging Web Role application, using --phpRuntime (-r), then be sure to also include "Curl" extension (adds php_curl.dll), which is needed for "Windows Azure SDK for PHP Developers". This will be explained more later.

If user had extracted PHP runtime from PHP binary ZIP package, then all necessary PHP extensions necessary for this tool should be available; php_curl.dll and php_zip.dll.

Setup:
  • In this PHP runtime's php.ini, enable this extension by modifying it to be:
    • extension=php_zip.dll


Packaging Web Application for Windows Azure Deployment


php_curl.dll [Required]

"Windows Azure SDK for PHP Developers" requires PHP extension phpcurl.dll. Within the PHP runtime that will be provided to this tool, using --phpRuntime (-r), validate that phpcurl.dll is within PHP runtime's \ext directory.

If php_curl.dll is not within PHP runtime's \ext directory and user had installed this PHP runtime using PHP Windows installer, then the user will need to re-install their PHP runtime and select adding "Curl" extension.

If user had extracted PHP runtime from PHP binary ZIP package, then PHP extension php_curl.dll for this tool should be available.

Setup:
  1. Validate that php_curl.dll is within the PHP runtime's \ext directory that is expected to be used with packaging, --phpRuntime (-r).
  2. Modify PHP runtime's php.ini by enabling this extension:
    1. extension=php_curl.dll


php_azure.dll [Optional]

Required if you are getting configuration values from ServiceConfiguration.csdef, logging to the Azure Services Platform, or getting local resource information.

Setup:
  1. Download PHP extension php_azure.dll: Download
  2. Update PHP runtime that will be provided to this tool using --phpRuntime (-r):
    1. Modify PHP runtime's php.ini by adding this line that will enable this extension:
      1. extension=php_azure.dll
    2. In PHP runtime's \ext directory, include this extension.



php_sqlsrv.dll [Optional]

Required if using a SQL Server database in your application.

Setup:
  1. Download this PHP DLL extension: Download
  2. Update PHP runtime that will be provided to this tool using --phpRuntime (-r):
    1. Modify PHP runtime's php.ini by adding this line that will enable this extension:
      1. extension=php_sqlsrv.dll
    2. In PHP runtime's \ext directory, include this extension.


php_wincache.dll [Optional]

Required if you are using WinCache in your application. This is only available in Non-Thread Safe, so you will need to ensure that you have the correct thread-safety for the other extensions.

Setup:
  1. Download PHP extension php_wincache.dll: Download
  2. Update PHP runtime that will be provided to this tool using --phpRuntime (-r):
    1. Modify PHP runtime's php.ini by adding this line that will enable this extension:
      1. extension=php_wincache.dll
    2. In PHP runtime's \ext directory, include this extension.

Last edited Nov 17, 2010 at 10:42 PM by suchawla, version 11

Comments

No comments yet.