CINXE.COM
PHP : The Official Microsoft IIS Site
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> PHP : The Official Microsoft IIS Site </title> <link type="image/ico" href="/favicon.ico"> <link href="/Content/downloads.css" rel="stylesheet" /> <script type="text/javascript" src="https://consentdeliveryfd.azurefd.net/mscc/lib/v2/wcp-consent.js"></script> <script type="text/javascript" src="https://js.monitor.azure.com/scripts/c/ms.analytics-web-3.min.js"></script> <script> var siteConsent = null; const analytics = new oneDS.ApplicationInsights(); var config = { instrumentationKey: "4181d76f98054ec6a4a9b8e669b3d510-a9e74d90-c641-41b4-8498-056decd0ac58-7286", channelConfiguration: { // Post channel configuration eventsLimitInMem: 5000 }, propertyConfiguration: { // Properties Plugin configuration env: "PROD", // Environment can be set to PPE or PROD as needed. gpcDataSharingOptIn: false, // Include the CCPA "GPC_DataSharingOptIn" property as false callback: { userConsentDetails: WcpConsent !== 'undefined' && WcpConsent.siteConsent ? WcpConsent.siteConsent.getConsent : undefined }, }, webAnalyticsConfiguration: { // Web Analytics Plugin configuration //urlCollectQuery:true, autoCapture: { scroll: true, pageView: true, onLoad: true, onUnload: true, click: true, resize: true, jsError: true } } }; //Initialize SDK analytics.initialize(config, []); window.addEventListener('DOMContentLoaded', function () { manageCaliforniaPrivacy(); function onConsentChanged(categoryPreferences) { console.log("onConsentChanged", categoryPreferences); } WcpConsent.init("en-US", "cookie-banner", function (err, _siteConsent) { if (err != undefined) { return error; } else { siteConsent = _siteConsent; //siteConsent is used to get the current consent } }); siteConsent.onConsentChanged(watchConsentChanges); if (siteConsent.isConsentRequired) { document.getElementsByClassName('manageCookieChoice')[0].style.display = 'inline-block'; } else { //$(".manageCookieChoice").css("display", "none"); document.getElementsByClassName('manageCookieChoice')[0].style.display = 'none'; } function getUserConsent() { var userConsent = siteConsent.getConsent(); //response will look like this //{"Required":true,"Analytics":true,"SocialMedia":false,"Advertising":false} } function dropSocialMediaCookies() { if (siteConsent.getConsentFor(WcpConsent.consentCategories.SocialMedia)) { //Drop social media cookies } } }); function manageConsent() { if (siteConsent.isConsentRequired) { siteConsent.manageConsent(); } } function manageCaliforniaPrivacy() { //Link is required in the footer to comply with the California Privacy Rights Act let tZone = Intl.DateTimeFormat().resolvedOptions().timeZone; if (tZone.toLowerCase() == 'america/los_angeles') { document.getElementsByClassName('managePrivacyChoice')[0].style.display = 'inline-block'; } else { document.getElementsByClassName('managePrivacyChoice')[0].style.display = 'none'; } } function clearCookie(name, domain, path) { try { function Get_Cookie(check_name) { // first we'll split this cookie up into name/value pairs // note: document.cookie only returns name=value, not the other components var a_all_cookies = document.cookie.split(';'), a_temp_cookie = '', cookie_name = '', cookie_value = '', b_cookie_found = false; for (i = 0; i < a_all_cookies.length; i++) { // now we'll split apart each name=value pair a_temp_cookie = a_all_cookies[i].split('='); // and trim left/right whitespace while we're at it cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); // if the extracted name matches passed check_name if (cookie_name == check_name) { b_cookie_found = true; // we need to handle case where cookie has no value but exists (no = sign, that is): if (a_temp_cookie.length > 1) { cookie_value = unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g, '')); } // note that in cases where cookie is initialized but no value, null is returned return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if (!b_cookie_found) { return null; } } if (Get_Cookie(name)) { var domain = domain || document.domain; var path = path || "/"; var today = new Date(); var expiryDate = new Date(); expiryDate.setDate(today.getDate() - 2); document.cookie = name + "=; expires=" + expiryDate + "; domain=" + domain + "; path=" + path; } } catch (err) { } }; </script> <script id="uhf-footer-ccpa"> //Detect GPC const globalPrivacyControlEnabled = navigator.globalPrivacyControl; // set data sharing opt-in to false when GPC/AMC controls detected const GPC_DataSharingOptIn = (globalPrivacyControlEnabled) ? false : checkThirdPartyAdsOptOutCookie(); analytics.getPropertyManager().getPropertiesContext().web.gpcDataSharingOptIn = GPC_DataSharingOptIn; //Detect AMC opt out choice function checkThirdPartyAdsOptOutCookie() { try { const ThirdPartyAdsOptOutCookieName = '3PAdsOptOut'; var cookieValue = getCookie(ThirdPartyAdsOptOutCookieName); console.log("cookie value", cookieValue); // for unauthenticated users return cookieValue != 1; } catch { return true; } } function getCookie(cookieName) { var cookieValue = document.cookie.match('(^|;)\\s' + cookieName + '\\s*=\\s*([^;]+)'); return (cookieValue) ? cookieValue[2] : ''; } </script> <script type="text/javascript" src="https://iisumbraco.blob.core.windows.net/media/7435263/jquery-3.5.1.min.js"></script> <script type="text/javascript" src="https://iisumbraco.blob.core.windows.net/media/7435263/main.js"></script> </head> <body> <div id="skiptocontent"><a href="#hero" class="skip-content">skip to main content</a></div> <div id="cookie-banner"></div> <div class="container"> <main role="main" class="pb-3"> <link href="/Content/php.css" rel="stylesheet" /> <header id="header-site" class='full-width single-nav'> <div class="ms-logo"><a href="javascript:0" class="icon-menu" aria-label="Expand to view navigation menu"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a id="logo" href="https://www.microsoft.com">Microsoft</a></div><p id="search-site"><input type="text" name="search" id="txt-search" placeholder="Search all of IIS.NET" aria-label="Search through site content"><button type="submit" id="btn-search-submit" aria-label="Search"><svg version="1.1" width="16" height="16" id="Layer_1" x="0px" y="0px" viewbox="0 0 18 18" enable-background="new 0 0 18 18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <path fill="#FFFFFF" stroke="#FFFFFF" stroke-width="1.5" d="M5.89,11.594c1.32,0,2.532-0.461,3.49-1.229l7.267,7.268c0.122,0.119,0.28,0.182,0.439,0.182s0.319-0.063,0.44-0.182c0.242-0.244,0.242-0.639,0-0.881L10.26,9.486c0.767-0.958,1.229-2.17,1.229-3.49c0-3.087-2.511-5.598-5.599-5.598c-3.087,0-5.598,2.511-5.598,5.598S2.803,11.594,5.89,11.594 M5.89,1.642c2.401,0,4.354,1.953,4.354,4.354S8.291,10.35,5.89,10.35c-2.4,0-4.354-1.953-4.354-4.354S3.489,1.642,5.89,1.642"></path></svg></button></p> <script type="text/javascript"> var currentUsername = ''; </script> <nav id="nav-primary" aria-label="Primary navigation menu"><a href="/" class="iis-logo">IIS</a><ul class="menu"><li><a href="/"> Home </a></li><li><a href="https://docs.microsoft.com/en-us/IIS-Administration/"> Manage </a></li><li><a href="/downloads"> Downloads </a> </li><li><a href="/learn"> Learn </a></li><li><a href="/configreference"> Reference </a></li> <li id="solutions-menu"><a href="javascript:;" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Solutions <span></span></a> <div> <ul> <li>Technologies</li> <li><a href="https://www.microsoft.com/net">.NET Framework</a></li> <li><a href="//www.asp.net">ASP.NET</a></li> <li><a href="https://php.iis.net/">PHP</a></li> <li><a href="https://www.microsoft.com/en-us/cloud-platform/windows-server">Windows Server</a></li> <li><a href="https://www.microsoft.com/en-us/sql-server/">SQL Server</a></li> <li><a href="https://webgallery.microsoft.com/gallery">Web App Gallery</a></li> <li><a href="https://azure.microsoft.com/">Microsoft Azure</a></li> </ul> <ul> <li>Tools</li> <li><a href="https://visualstudio.microsoft.com/">Visual Studio</a></li> <li><a href="https://code.visualstudio.com/">Visual Studio Code</a></li> <li><a href="https://www.microsoft.com/web/downloads/platform.aspx">Web Platform Installer</a></li> </ul> <ul> <li>Get Help:</li> <li><a href="https://forums.iis.net/">Ask a Question in our Forums</a></li> <li><a href="/contact">More Help Resources</a></li> </ul> </div> </li> <li><a href="https://blogs.iis.net/"> Blogs </a></li><li class="last-child"><a href="https://forums.iis.net/">Forums</a></li></ul></nav> </header> <div class="full-width"> <section id="hero" class="hero-php"> <header> <h1>PHP on Windows...</h1> </header> <p>Run your favorite PHP applications on IIS today!</p> <p class="actions"><a class="btn" href="https://www.microsoft.com/web/handlers/webpi.ashx?command=getinstallerredirect&appid=php53">Install PHP Now</a></p> </section> <nav id="breadcrumb" aria-label="breadcrumb"><p><a href="/">Home</a><span>PHP</span></p></nav> <div class="page two-right"> <section class="col-mid"> <div class="col-equal-three"> <header> <h2 class="title" title="Running PHP on IIS">Running PHP on IIS</h2> </header> <section> <p>Increase the performance of PHP applications running on Windows Server with the <a href="//www.iis.net/downloads/microsoft/wincache-extension">Windows Cache Extension for PHP</a></p> </section> <section> <p>Improved performance and greater reliability for PHP applications is ensured by the <a href="//www.iis.net/learn/application-frameworks/running-php-applications-on-iis/set-up-fastcgi-for-php">FastCGI</a> component for <a href="//www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis-60">IIS 6.0</a> and <a href="//www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis">IIS 7.0</a></p> </section> <section> <p>Enable and manage PHP and FastCGI with <a href="https://phpmanager.codeplex.com/documentation">PHP Manager for IIS7</a></p> <p><a href="//www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis">More about PHP applications on IIS</a> </p></section> </div> <section class="grouped-list"> <header><h3>PHP Blogs</h3><ul class="group-nav"><li><a href="https://blogs.iis.net/blogs/tag/php">View All</a></li><li><a href="https://blogs.iis.net/feed/popular-tags_php.xml" class="RSS" aria-label="Subscribe"><svg viewbox="0 0 2048 2048" width="18" height="18" xmlns="http://www.w3.org/2000/svg"><path d="M192 1536q40 0 75 15t61 41 41 61 15 75q0 40-15 75t-41 61-61 41-75 15q-40 0-75-15t-61-41-41-61-15-75q0-40 15-75t41-61 61-41 75-15zM0 1024q124 0 238 32t214 90 181 140 140 181 91 214 32 239H736q0-101-26-195t-75-176-115-149-149-115-176-74-195-27v-160zm0-512q194 0 374 50t336 142 285 220 220 285 142 336 51 375h-160q0-172-44-331t-126-298-196-253-252-195-298-126T0 672V512zM0 0q265 0 510 68t459 194 388 300 301 389 193 458 69 511h-160q0-243-63-467t-178-420-275-356-356-276-420-178T0 160V0z"></path></svg></a></li></ul></header><article class="author-list"><header><h4><a href="https://blogs.iis.net:443/ruslany/How-to-warm-up-Azure-Web-App-during-deployment-slots-swap">How to warm up Azure Web App during deployment slots swap</a></h4><p>Wednesday September 30, 2015 by ruslany</p><img src="https://iisumbraco.blob.core.windows.net/media/7435248/ruslany.jpg" alt="author" class="author"></header><p>Azure Web App deployment slots are used to help roll out new versions of an app without downtime or cold start activation. New version is typically deployed to a staging slot, then after testing an...</p></article> </section> <section class="half-left"> <div class="rss-heading"><h4>Latest General PHP Posts</h4><a class="small-rss" href="https://forums.iis.net/f/rss/1102">RSS</a></div><div class="subscribe-controls"><a class="php-subscribe" href="//forums.iis.net/1102.aspx">More PHP Posts</a></div><ul><li><a href="https://forums.iis.net/p/1209573/2073536.aspx?IIS+7+5+adding+Document+Moved+content+when+Location+header+is+present">IIS 7.5 adding 'Document Moved' content when 'Location' header is present</a></li><li><a href="https://forums.iis.net/p/1253018/2165779.aspx?mediawiki+1+35+upgrade+changed+image+links">mediawiki 1.35 upgrade changed image links</a></li><li><a href="https://forums.iis.net/p/1147542/1861796.aspx?moodle+fastcgi+internet+explorer+error+500">moodle fastcgi internet explorer error 500</a></li><li><a href="https://forums.iis.net/p/1240734/2146455.aspx?PHP+7+2+on+IIS+extremely+slooow+string+concat+but+everything+else+works+great+">PHP 7.2 on IIS extremely slooow . string concat, but everything else works great??!</a></li><li><a href="https://forums.iis.net/p/1248726/2157751.aspx?Sql+Connection+fails+until+App+Pool+recycle">Sql Connection fails until App Pool recycle</a></li><li><a href="https://forums.iis.net/p/1248536/2157521.aspx?Issue+with+app+pool+and+included+files">Issue with app pool and included files</a></li><li><a href="https://forums.iis.net/p/1243425/2150919.aspx?WEBSOCKETS+with+PHP+in+recent+WINDOWS+enviroment+IIS+10+">WEBSOCKETS with PHP in recent WINDOWS enviroment (IIS 10)</a></li></ul> </section> <section class="half-right"> <div class="rss-heading"><h4>Latest FastCGI Posts</h4><a class="small-rss" href="https://forums.iis.net/f/rss/1104">RSS</a></div><div class="subscribe-controls"><a class="php-subscribe" href="//forums.iis.net/1104.aspx">More FastCGI Posts</a></div><ul><li><a href="https://forums.iis.net/p/1253008/2165748.aspx?HTTP+Error+500+0+Internal+Server+Error+The+FastCGI+process+exited+unexpectedly">HTTP Error 500.0 - Internal Server Error - The FastCGI process exited unexpectedly</a></li><li><a href="https://forums.iis.net/p/1252568/2164820.aspx?The+fastCgi+element+configuration+levels">The <fastCgi> element configuration levels</a></li><li><a href="https://forums.iis.net/p/1249996/2159550.aspx?Is+site+level+fastcgi+configuration+possible+">Is site level fastcgi configuration possible?</a></li><li><a href="https://forums.iis.net/p/1251323/2162311.aspx?wincache+on+iss">wincache on iss</a></li><li><a href="https://forums.iis.net/p/1234390/2127005.aspx?URL+rewrite+with+IIS+and+FastCGI">URL rewrite with IIS and FastCGI</a></li><li><a href="https://forums.iis.net/p/1250285/2160131.aspx?download+of+larger+static+file+stops+using+wfastcgi+and+Flask+on+IIS10+and+Windows+Server+2019">download of larger static file stops using wfastcgi and Flask on IIS10 and Windows Server 2019</a></li><li><a href="https://forums.iis.net/p/1249215/2158404.aspx?IIS+Application+Memory+Limits+with+FastCGI">IIS Application Memory Limits with FastCGI</a></li></ul> </section> </section> <section class="col-right"> <nav class="nav-base" aria-label="Sidebar navigation menu"> <div id="FeaturedAd" data-adzoneid="674040" class="ad-300x250 " data-adwidth="300px" data-adheight="250px" style="width: 300px; height: 250px;"> <iframe title="advertisement" width="300" height="250" scrolling="No" frameborder="0" marginheight="0" marginwidth="0" src="https://effectus.nui.media/pipeline/674040/0/vh?z=effectus&dim=602457&kw=&click="> <script type="text/javascript" lang="JavaScript" src="https://effectus.nui.media/pipeline/674040/0/vj?z=effectus&dim=602457&kw=&click=&abr=$scriptiniframe"></script> <noscript> <a href="https://effectus.nui.media/pipeline/674040/0/cc?z=effectus"> <img src="https://effectus.nui.media/pipeline/674040/0/vc?z=effectus&dim=602457&kw=&click=&abr=$imginiframe" width="300" height="250" alt="" border="0"> </a> </noscript> </iframe> </div> <h2>For PHP Developers</h2> <ul> <li><a href="https://www.microsoft.com/web/gallery/developer.aspx">List your app in the Application Gallery</a></li> <li><a href="//www.iis.net/downloads/microsoft/url-rewrite">Use the Microsoft Rewrite Module to enable search engine friendly URLs</a></li> <li><a href="//www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig">Translating .htaccess Content to IIS web.config</a></li> <li><a href="//www.iis.net/learn/get-started/planning-for-security/secure-content-in-iis-through-file-system-acls">Secure Your Content with File System ACLs</a></li> </ul> <h2>Popular PHP Forums</h2> <ul> <li><a href="//forums.iis.net/1102.aspx">IIS Forum - General PHP Discussion</a></li> <li><a href="//forums.iis.net/1104.aspx">IIS Forum - FastCGI on IIS7</a></li> <li><a href="//forums.iis.net/1103.aspx">IIS Forum - FastCGI on IIS6</a></li> <li><a href="//forums.iis.net/1152.aspx">IIS Forum - URL Rewriter</a></li> </ul> <h2 class="float-left">news.php.net Forum</h2><a class="subscribe" href="">Subscribe</a><div><a class="more clearfix" href="http://news.php.net/group.php?group=php.windows">More forum posts</a></div> </nav> </section> </div> <div id="BottomAd" data-adtypeid="674039" class="ad centered-ad-728" data-adwidth="728px" data-adheight="90px" style="width: 728px; height: 90px;"> <iframe title="advertisement" width="728" height="90" scrolling="No" frameborder="0" marginheight="0" marginwidth="0" src="https://effectus.nui.media/pipeline/674039/0/vh?z=effectus&dim=602464&kw=&click="> <script type="text/javascript" lang="JavaScript" src="https://effectus.nui.media/pipeline/674039/0/vj?z=effectus&dim=602464&kw=&click=&abr=$scriptiniframe"></script> <noscript> <a href="https://effectus.nui.media/pipeline/674039/0/cc?z=effectus"> <img src="https://effectus.nui.media/pipeline/674039/0/vc?z=effectus&dim=602464&kw=&click=&abr=$imginiframe" width="728" height="90" alt="" border="0"> </a> </noscript> </iframe> </div> <footer id="footer-site"> <ul> <li class="text-links">This site is managed for Microsoft by Neudesic, LLC. | © 2024 Microsoft. All rights reserved.</li> <li><a href="https://go.microsoft.com/fwlink/?LinkId=521839" data-mscc-ic="false">Privacy Statement</a></li> <li><a href="/terms-of-use" data-mscc-ic="false">Terms of Use</a></li> <li><a href="/contact">Contact Us</a></li> <li><a href="https://azure.microsoft.com/">Hosted on Microsoft Azure</a></li> <li><a href="https://www.effectusmedia.com/?site=iis#contactus">Advertise with Us</a></li> <li style="display:none" class="manageCookieChoice"><a href="#" onclick="javascript:manageConsent(); return false;" data-s-object-id="footer">Manage cookies</a></li> <li style="display:none" class="managePrivacyChoice"><a href="https://aka.ms/yourcaliforniaprivacychoices"> <svg role="img" xmlns="http://www.w3.org/2000/svg" width="30px" viewbox="0 0 30 14" xml:space="preserve"> <title>California Consumer Privacy Act (CCPA) Opt-Out Icon</title> <path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" style="fill-rule: evenodd; clip-rule: evenodd; fill: #fff"></path> <path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" style="fill-rule: evenodd; clip-rule: evenodd; fill: #06f"></path> <path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" style="fill: #fff"></path> <path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" style="fill: #06f"></path> </svg> <span>Your Privacy Choices</span> </a></li> </ul> <ul class="social"> <li>Follow us on:</li> <li><a href="https://www.twitter.com/inetsrv/" class="twitter">Twitter</a></li> <li><a href="https://facebook.com/inetsrv/" class="facebook">Facebook</a></li> </ul> <ul class="logo"> <li><a href="https://microsoft.com/" class="logo-footer">Microsoft</a></li> <li><a href="https://forums.iis.net/1080.aspx">Feedback on IIS</a></li> </ul> </footer> </div> </main> </div> </body> </html>