DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Tutorial - Using the Windows Azure SDK for PHP

Tutorial - Using the Windows Azure SDK for PHP

Maarten Balliauw user avatar by
Maarten Balliauw
·
Dec. 14, 10 · Interview
Like (0)
Save
Tweet
Share
11.48K Views

Join the DZone community and get the full member experience.

Join For Free

This tutorial focuses on obtaining the Windows Azure SDK and a Windows Azure storage account. In all tutorials, the Windows Azure development storage will be used for working with Windows Azure storage services. Development storage is a simulation environment that runs on your local computer and can be used for development purposes. However, it is also possible to work through the tutorials using a production Windows Azure storage account. Both alternatives are described in the next two topics.

Installing Windows Azure development storage

The Windows Azure SDK provides the Windows Azure development storage and additional features which make it easier to build & test applications. The SDK requires a version of Windows 7, Windows Vista Service Pack 1 or greater, or Windows Server 2008 with a version of SQL Server Express or SQL Server installed.

The download for the Windows Azure SDK can be found at http://msdn.microsoft.com/en-us/windowsazure/cc974146.aspx.

After installation, the development storage service can be started through the Start button, All programs, Windows Azure SDK, Development Storage.

image

Figure 1: Development Storage

The storage service endpoints are listed in the development storage UI:

  • http://127.0.0.1:10000
  • http://127.0.0.1:10002
  • http://127.0.0.1:10001

Access to the storage endpoints is granted based on an account key that you choose and a generated account key. For the development storage environment, the following account is the default one:

Account name: devstoreaccount1
Account key: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

Creating a production Windows Azure storage account

If you choose not to work with development storage, or want to deploy your application to the Windows Azure production environment, the following steps need to be taken:

1. You need a Windows Live ID

2. You need a Windows Azure subscription. The Introductory Special offers plenty of free storage for development purposes.

3. After activating your subscription, navigate to the Windows Azure Developer Portal, click on your Project Name, then on New Service and select Storage Account:

image

Figure 2: Creating a storage account

4. Provide a Service Label and Description for your storage account and click Next.

image

Figure 3: Storage account service label

5. After this, a globally unique name for your storage account has to be decided. Also, a Region for your storage service has to be decided: in which datacenter should all data be stored? After specifying the DNS name and Region, click Create.

image

Figure 4: Specifying DNS name and region

6. The storage account will be created and added to your Windows Azure subscription. All details such as storage endpoints, account name and account key are listed on the details page.

image

Figure 5: Storage account details

A Windows Azure storage account is structured as follows: every account includes blob storage, table storage and the queue service with specific HTTP(S) endpoints that are listed on the storage account details page:

  • http://<account>.blob.core.windows.net
  • http:// <account>.table.core.windows.net
  • http:// <account>.queue.core.windows.net

The account details for the current storage account are the following:

Account name: mystorageplayground
Account key: Kd9goKFw/QtP0AFIxxUQ08q9ntgTA5TcUcw5cgE3eOUOBDhBIiE991Q4AK/5PmQiWlYzAlWRf1uqVUnq7/FD4Q==

 

Obtaining & installing the Windows Azure SDK for PHP

The Windows Azure SDK for PHP focuses on providing a means of interacting with the storage and diagnostic components of Windows Azure by providing an abstraction of the REST operations that are exposed by Windows Azure storage in the form of an easy-to-use PHP class library.

Manual installation

The Windows Azure SDK for PHP can be downloaded from http://phpazure.codeplex.com:

1. Navigate to http://phpazure.codeplex.com and click the Downloads tab.

2. Under Recommended Download, download the file that is listed.

3. Extract the downloaded archive to your hard disk. The unzipped folder structure looks like the following:

image

Figure 6: Folder structure of extracted Windows Azure SDK for PHP

You may now use the Windows Azure SDK for PHP in your applications.

Installation via PEAR

If you are used to working with PEAR (PHP Extension and Application Repository, more information via http://pear.php.net),  you can also install the Windows Azure SDK for PHP through a PEAR channel. The following steps can be taken to discover the Windows Azure for PHP PEAR channel and install the latest Windows Azure SDK for PHP package:

1. Open a PHP console and ensure that PEAR is installed.

2. Register the Windows Azure SDK for PHP PEAR channel by issuing the command pear channel-discover pear.pearplex.net

image

Figure 7: Registering the Windows Azure for SDK PEAR channel

3. After successful channel registration, install the Windows Azure SDK for PHP by issuing the command pear install pearplex/PHPAzure

image

Figure 8: Installing the WIndows Azure SDK for PHP PEAR package

4. The Windows Azure SDK for PHP is now installed at <path to PHP>/PEAR/PHPAzure

 

Additional Resources

  • WindowsAzure for PHP - Articles, tutorials, downloads, and more

 

Software development kit PHP azure

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Benefits and Challenges of Multi-Cloud Integration
  • Best Practices for Writing Clean and Maintainable Code
  • ClickHouse: A Blazingly Fast DBMS With Full SQL Join Support
  • Use Golang for Data Processing With Amazon Kinesis and AWS Lambda

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: