Now that we have PHP setup on our laptop, we can start working with the PHP for Azure SDK. If you don’t have PHP setup, see my previous blog entry:
CodePlex – Download the PHPAzure SDK
What is Windows Azure SDK for PHP Developers?
- The PHP SDK for Azure is an example of interoperability
- The SDK is open source and gives developers access to Azure Blobs, Tables & Queues
- There are also PHP classes for HTTP transport, AuthN/AuthZ, REST & Error Management
- There is support for Manageability, Instrumentation & Logging support
- Finally, there is support for storing PHP sessions in Azure Table Storage
- Supported Operating System: Windows 7(recommended); Windows Server 2008; Windows Vista
- Required Software
- Windows Vista SP1 (when installing on Windows Vista)
- .NET Framework 3.5 SP1
- IIS 7.0 (with ASP.NET, WCF HTTP Activation and optionally CGI)
- SQL Server 2005 Express Edition (or above)
- Hotfix: Support for FastCGI on the Development Fabric (not required for Windows 7, or Windows Server 2008 SP2 or later)
- Windows Azure SDK 1.0 (November 2009)
Eclipse is the development environment. You will probably want to download it.
Figure – Download for Eclipse and Zend Server Community Edition
The following two files can be downloaded from:
We’ll work with this documentation momentarily.
This is the website where we’ll learn to code up PHP under Eclipse.
This is the setup for Eclipse. I’m assuming that you have already signed up for an Azure account as http://windows.azure.com
The open source project promises a lot of good stuff. I’m going to try to use some of it.
Project wizard targets Azure
You can convert with a migration tool
Creates Azure Roles
Includes a storage explorer
UD operations on Blogs, Tables, Queues
Just a right mouse click away within Eclipse
You will need to install Java – The Eclipse IDE is built on Java
I’ve installed the latest version, version 6 update 23.
There are various versions of Eclipse. The version that I used is:
Install Eclipse into c:\program files
I’m not sure I want to install Eclipse off of my “c:” drive, but instead want “c:\program files,” but that is going to take some admin privileges.
I basically run Winzip as administrator so that I could install to “c:\program files”
Run Eclipse – Let’s Get Started
Eclipse will ask for a workspace location to save files.
Eclipse Is Now Up and Running
The welcome screen below can typically be skipped.
We have already done 2 things:
- A long time ago, when I installed Windows 7, I installed IIS
- Go to control panel
- “Turn Windows feature
After adding IIS during my Windows 7 install and after using the Web Platform Installer to install PHP, the following directory that I will test locally in is:
Creating a New Project
As in any IDE, the best thing to do is to create a project, then some code or markup. I thought I’d start with the code. But we’ll find is that we just plain forgot to do some things.
Figure – New PHP Project
Note that I set my directory to “c:\inetpub\wwwroot\”
View the “PHP Explorer.”
Add a new “PHP File.”
Call that new file, “ShowInfo.php.”
Type in some code as seen below. The code is:
Make sure that when you run your application, you have the following url:
This, to some extent, is a measure of success. We can even debug the page.
Select “Debug As, PHP Script.”
Debugger works, always a welcome sign of progress. It is up to you now to learn about debugger commands. See my previous blogs about debugging for Visual Studio. Eclipse cannot do as many scenarios, but it can do a few. As you can see, all your debugging commands are available.
Windows Azure Tools for Eclipse
These tools extend the Eclipse IDE to more affectively leverage Windows Azure. Go to the Help Menu and select “Install New Software.”
Click “Add” and type in the following.
The next few minutes are needed to download and install all the needed files.
Go to the “Help” menu and select “About Eclipse”
Next, click on the button that says, “Installation Details.”
That’s what mine looks like at this point. I think we are ready to play with Azure some more.
As you can see, my copy of Eclipse has “Windows Azure” menu.
This concludes the setup. I may go back and edit it if things do not work right once I get further into PHP and Azure. If you run into any surprises, let me know. E-Mail me at email@example.com.
The next step is to start writing some code that talks to Azure for data.