php教程

Azure App Services

PHP is frequently used on Azure App Services (aka Microsoft Azure, Windows Azure, Azure Web Apps).

Azure App Services manages pools of Windows Web Servers to host your web application, as an alternative to managing your own web server on your own Azure Compute VMs or other servers.

PHP is already enabled for your Azure App Services web site automatically. In the Azure Portal, select your web site, and you can choose which version of PHP to use. You may want to choose a newer version than the default.

As such, PHP and extensions will run on Azure App Services just as it will on other Windows servers. Much of the knowledgebase is also portable, so see the Windows Troubleshooting Page too. However, the management interface for Azure App Services is different:

  • Azure portal: create, edit settings and delete web sites. » Azure Portal

  • Kudu Dashboard: [your web site name].azurewebsites.net Then, the Kudu dashboard is » https://[your web site name].scm.azurewebsites.net/. The Dashboard gives you access to some debugging capabilities, file management and site extensions. Site extensions are an Azure mechanism to add extra programs, like PHP preview builds, to your web site.

  • You can not use IIS Manager, Server Manager, or RDP.

There is also a PHP SDK for programmatically using many Azure Services from your PHP code. See » Azure SDK for PHP.

For more information, see » Azure PHP Developer Center

WinCache

WinCache is enabled by default on Azure App Services and it is recommended that you leave it enabled. If you install your own build of PHP, you should enable WinCache on that too.

Custom PHP Build

You may upload your own PHP build to your D:\Home (C:\ is NOT writable). Then in the Azure Portal, set SCRIPT_PROCESSOR for .php to the absolute path to php-cgi.exe file in your build.

User Contributed Notes

Anonymous 03-Mar-2014 09:08
The "Azure SDK for PHP" link provided above (which points to the Interoperability Bridges website) has been deprecated in favour of an SDK hosted on GitHub...
http://github.com/WindowsAzure/azure-sdk-for-php

There is also a supporting "PHP Developer Center" website:
http://www.windowsazure.com/en-us/develop/php/

I did try editing the URL for the "Azure SDK for PHP" myself, but the URLs seem to be stored in a separate file which I was unable to find.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788