<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Blog</title>
		<link>http://www.halkyon.net/blog/rss</link>
		<atom:link href="http://www.halkyon.net/blog/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Setup PHP on Windows Server 2008 R2</title>
			<link>http://www.halkyon.net/blog/setup-php-on-windows-server-2008-r2/</link>
			<description>&lt;p&gt;Sometimes you'll have a need to install PHP on Windows to run a CMS or framework that requires it.&lt;/p&gt;
&lt;p&gt;This guide applies to Windows 7 and Windows Server 2008 R2. Vista and Server 2008 should work, but you'll have to install &lt;a href=&quot;http://www.iis.net/download/AdministrationPack&quot;&gt;IIS 7 Administration Pack&lt;/a&gt; to get FastCGI support in IIS.&lt;/p&gt;
&lt;p&gt;In this case, I've used this guide as a base to get &lt;a href=&quot;http://silverstripe.org&quot;&gt;SilverStripe&lt;/a&gt; working on Windows, but the idea can be used for other applications like Drupal, and Wordpress.&lt;/p&gt;
&lt;p&gt;I've also written &lt;a href=&quot;http://doc.silverstripe.org/sapphire/en/installation/windows-manual-iis-7&quot;&gt;an expanded guide&lt;/a&gt; on the SilverStripe documentation site if you're looking for more information.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;IIS 7.5 + FastCGI&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://phpmanager.codeplex.com/&quot;&gt;PHP Manager for IIS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.iis.net/download/URLRewrite&quot;&gt;URL Rewrite Module for IIS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Install PHP&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;Download the latest stable PHP &lt;strong&gt;(VC9, x86)&lt;/strong&gt; zip from &lt;a href=&quot;http://windows.php.net/download&quot;&gt;http://windows.php.net/download&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Extract zip contents to &lt;strong&gt;C:\php&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open PHP Manager for IIS and register &lt;strong&gt;C:\php\php-cgi.exe&lt;/strong&gt; to enable PHP for IIS&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Install sqlsrv extension for PHP (optional: if you need SQL Server support in PHP)&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;Download executable from &lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=20098&quot;&gt;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=20098&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Extract contents to a temporary location, such as C:\sqlsrv&lt;/li&gt;
&lt;li&gt;Copy &lt;strong&gt;php_sqlsrv_53_nts_vc9.dll&lt;/strong&gt; to C:\php\ext&lt;/li&gt;
&lt;li&gt;Rename the file to &lt;strong&gt;php_sqlsrv.dll&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open PHP Manager and go to &lt;strong&gt;Enable or disable an extension&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Right click &lt;strong&gt;php_sqlsrv.dll&lt;/strong&gt; and hit &lt;strong&gt;Enable&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Install wincache extension for PHP&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;Download the latest wincache &lt;strong&gt;(for PHP 5.3, x86)&lt;/strong&gt; from &lt;a href=&quot;http://www.iis.net/download/wincacheforphp&quot;&gt;http://www.iis.net/download/wincacheforphp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Extract zip contents to a temporary location, such as C:\wincache&lt;/li&gt;
&lt;li&gt;Copy &lt;strong&gt;php_wincache.dll&lt;/strong&gt; to &lt;strong&gt;C:\php\ext&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open PHP Manager and go to &lt;strong&gt;Enable or disable an extension&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Right click &lt;strong&gt;php_wincache.dll&lt;/strong&gt; and hit &lt;strong&gt;Enable&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: 19px; font-weight: bold; line-height: 38px; &quot;&gt;Finishing up in PHP Manager&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;First of all, restart IIS to apply all changes&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Check phpinfo()&lt;/strong&gt; in PHP Manager&lt;/li&gt;
&lt;li&gt;Ensure that &lt;strong&gt;wincache&lt;/strong&gt; and &lt;strong&gt;sqlsrv&lt;/strong&gt; details can be found in the information&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Enable or disable an extension&lt;/strong&gt; and disable everything, except for these:&lt;/li&gt;
&lt;/ul&gt;&lt;p style=&quot;padding-left: 30px;&quot;&gt;php_curl.dll&lt;br/&gt; php_gd2.dll&lt;br/&gt; php_mbstring.dll&lt;br/&gt; php_sqlsrv.dll (if you need SQL Server support in PHP)&lt;br/&gt; php_wincache.dll&lt;br/&gt; php_tidy.dll&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Go to &lt;strong&gt;Configure error reporting&lt;/strong&gt; and check &lt;strong&gt;Development machine&lt;/strong&gt; (or &lt;strong&gt;Production machine&lt;/strong&gt; if appropriate)&lt;/li&gt;
&lt;li&gt;Go to &lt;strong&gt;Manage all settings&lt;/strong&gt; and ensure the following are set to these values:&lt;/li&gt;
&lt;/ul&gt;&lt;p style=&quot;padding-left: 30px;&quot;&gt;date.timezone = &quot;Pacific/Auckland&quot; (or whatever your timezone is from &lt;a href=&quot;http://www.php.net/manual/en/timezones.php&quot;&gt;this list of support timezones in PHP&lt;/a&gt;.&lt;br/&gt; post_max_size = 64M&lt;br/&gt; memory_limit = 256M&lt;br/&gt; upload_max_filesize = 64M&lt;/p&gt;
&lt;p&gt;Restart IIS so all configuration takes effect.&lt;/p&gt;
&lt;p&gt;Now you should have PHP up and running on Windows, and have a clean way of managing the configuration from IIS Manager, thanks to the very useful PHP Manager for IIS extension.&lt;/p&gt;</description>
			<pubDate>Tue, 04 Oct 2011 03:32:21 +1300</pubDate>
			
			
			<guid>http://www.halkyon.net/blog/setup-php-on-windows-server-2008-r2/</guid>
		</item>
		

	</channel>
</rss>
