<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k" -->

---
title: Using Windows Azure Drive in PHP (or Ruby) | daily.dev
description: A technique is demonstrated for mounting a Windows Azure Drive (XDrive) and making it accessible from PHP or Ruby applications running on Windows Azure, since...
canonical: https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Using Windows Azure Drive in PHP (or Ruby) | daily.dev
og:description: A technique is demonstrated for mounting a Windows Azure Drive (XDrive) and making it accessible from PHP or Ruby applications running on Windows Azure, since...
og:url: https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k
og:image: https://api.daily.dev/og/posts/An7AOq43K.png
og:image:alt: Using Windows Azure Drive in PHP (or Ruby)
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Windows Azure Drive in PHP (or Ruby)

**[Maarten Balliauw](https://daily.dev/sources/maartenballiauw)** · 6 min read · 0 upvotes · 0 comments

## Summary

A technique is demonstrated for mounting a Windows Azure Drive (XDrive) and making it accessible from PHP or Ruby applications running on Windows Azure, since only .NET code can natively create and mount these virtual hard drives. By leveraging IIS7's integrated pipeline model, a custom .NET HTTP module runs alongside the PHP FastCGI process, mounts the Azure Drive, and passes the resulting drive letter to PHP through a server variable. Full implementation code for the HTTP module, configuration steps for ServiceDefinition.csdef, ServiceConfiguration.cscfg, and Web.config are provided, along with sample PHP code reading and writing files to the mounted drive. Source and binaries are published on the PHPAzureContrib CodePlex project, and other use cases are suggested such as modifying php.ini before PHP runs or using .NET authentication modules with PHP.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.maartenballiauw.be/posts/2010-04-09-using-windows-azure-drive-in-php-or-ruby>

## Questions this post answers

### How can I access a Windows Azure Drive from a PHP application since there's no PHP SDK support for drives?

Create a custom .NET HTTP module implementing IHttpModule that mounts the Windows Azure Drive during the Init method and writes the resulting drive letter into an environment variable, such as CloudDrive0. Because IIS7 uses an integrated pipeline, this .NET module runs in the same request pipeline as the FastCGI process executing PHP, and the drive letter becomes available to PHP through $_SERVER['CloudDrive0'].

_daily.dev surfaces practical workarounds like this for developers bridging PHP with cloud platform limitations._

## Similar posts on daily.dev

- [How I Deployed a PHP Web App on Azure App Service](https://daily.dev/posts/how-i-deployed-a-php-web-app-on-azure-app-service-voouyftxc) · Medium · 0 upvotes · 0 comments

---

Tags: [#php](https://daily.dev/tags/php), [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Using Windows Azure Drive in PHP (or Ruby)","url":"https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k"},"datePublished":"2026-10-04T13:04:44.000Z","dateModified":"2026-10-04T13:08:16.694Z","description":"A technique is demonstrated for mounting a Windows Azure Drive (XDrive) and making it accessible from PHP or Ruby applications running on Windows Azure, since...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/464f05a87e194983665cab6700be1829?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/464f05a87e194983665cab6700be1829?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Maarten Balliauw","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Maarten Balliauw","logo":"https://media.daily.dev/image/upload/s--rOTg3VYO--/f_auto,q_auto/v1791119043/logos/maartenballiauw?_a=BAMAMicg0","url":"https://daily.dev/sources/maartenballiauw"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"php,.net","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Maarten Balliauw","item":"https://daily.dev/sources/maartenballiauw"},{"@type":"ListItem","position":3,"name":"Using Windows Azure Drive in PHP (or Ruby)"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/using-windows-azure-drive-in-php-or-ruby--an7aoq43k#faq","mainEntity":[{"@type":"Question","name":"How can I access a Windows Azure Drive from a PHP application since there's no PHP SDK support for drives?","acceptedAnswer":{"@type":"Answer","text":"Create a custom .NET HTTP module implementing IHttpModule that mounts the Windows Azure Drive during the Init method and writes the resulting drive letter into an environment variable, such as CloudDrive0. Because IIS7 uses an integrated pipeline, this .NET module runs in the same request pipeline as the FastCGI process executing PHP, and the drive letter becomes available to PHP through $_SERVER['CloudDrive0']. daily.dev surfaces practical workarounds like this for developers bridging PHP with cloud platform limitations."}}]}
```

