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:
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.
Managing Projects Project wizard targets Azure You can convert with a migration tool Creates Azure RolesManaging Storage Includes a storage explorer Create CR
UD operations on Blogs, Tables, QueuesDeployment Just a right mouse click away within Eclipse
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”
Eclipse will ask for a workspace location to save files.
The welcome screen below can typically be skipped.
We have already done 2 things:
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:
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.
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 firstname.lastname@example.org.
The next step is to start writing some code that talks to Azure for data.