Home > Article > Backend Development > Analyze how PHP programs run in Windows Azure_PHP Tutorial
PHP is a very popular scripting language mainly used for processing dynamic web pages. PHP users will be pleasantly surprised by the ability to run PHP applications within the Windows Azure platform.
We know that one of the advantages of the Microsoft Windows Azure platform compared to other cloud computing platforms is its inherent advantages of convenient development tools and familiar programming languages.
Let’s take a look at how simple and easy it is to run PHP applications in Windows Azure.
Preconditions:
PHP
IIS 7 (Enable ASP.NET, WCF HTTP Activation)
Microsoft Visual Studio 2008 SP1 (or higher)
Windows Azure Tools for Microsoft Visual Studio (June 2010)
Code:
1. First, we download the latest version of non-thread-safe PHP from http://windows.php.net/download/.
The author downloaded the VC9 x86 Non Thread Safe (2010-Mar-04 20:11:07) version. In the sidebar of the download page, we can see the difference between the VC6 and VC9 versions. The VC6 version is compiled with the Visual Studio 6 compiler, while the VC9 version is compiled with the Visual Studio 2008 compiler, with improved performance and stability. . The difference between thread safety and non-thread safety is that the Windows operating system uses a multi-threaded architecture, while Linux and Unix use a multi-process architecture.
2. Open Visual Studio, create a new project->Visual C#->Cloud->Windows Azure Cloud Service. Enter the project name CloudService1 and click OK.
Add CGI_Web Role and rename it to PHP_WebCgiRole. Click OK.