<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Netexceed blog by Jason Mohan&#187; Netexceed by Jason Mohan</title>
	<atom:link href="http://www.jasonmohan.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonmohan.com</link>
	<description>I am an IT professional who loves to stay on the leading edge of technology, and tries to tackle most commonly faced issues by computer users, and administrators.</description>
	<lastBuildDate>Mon, 19 Jul 2010 20:18:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up a windows PHP server with MSSQL</title>
		<link>http://www.jasonmohan.com/php/setting-up-a-windows-php-server-with-mssql/</link>
		<comments>http://www.jasonmohan.com/php/setting-up-a-windows-php-server-with-mssql/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 14:26:51 +0000</pubDate>
		<dc:creator>Jason Mohan</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.netexceed.com/?p=304</guid>
		<description><![CDATA[Some of us, maybe a few of us need to setup a PHP webserver on a windows machine. I know you PHP fans are probably disgusted even thinking about PHP on a windows server. Anyways it&#8217;s not very easy to setup PHP, but yet it&#8217;s not difficult either, you just need to download a bunch [...]]]></description>
			<content:encoded><![CDATA[<p>Some of us, maybe a few of us need to setup a PHP webserver on a windows machine. I know you PHP fans are probably disgusted even thinking about PHP on a windows server. Anyways it&#8217;s not very easy to setup PHP, but yet it&#8217;s not difficult either, you just need to download a bunch of stuff. I setup PHP (without MySQL) on a Windows 2003 Enterprise Server. I needed to access a Microsoft SQL server in my environment so no need for a MySQL server. So this setup describes how to download PHP and the MSSQL extensions to allow you to connect to a remote MSSQL server.</p>
<p><strong>This assumes you&#8217;ve already installed IIS for Windows 2003. In this example I&#8217;m using x86.</strong></p>
<p>1. First download and install the Microsoft 2008 C++ Runtime. For <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF">x86 click here</a>, and for <a href="http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6&amp;displaylang=en">x64 click here</a>.</p>
<p>2. Download, and install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=2d481579-9a7c-4632-b6e6-dee9097f9dc5&amp;displaylang=en">Microsoft FastCGI addon for IIS</a> make sure it&#8217;s allowed in the IIS extensions (IIS Manager &gt; Web  Service Extensions), and restart the WWW publishing service.</p>
<p>3. Download and install <a href="http://windows.php.net/download/">PHP for Windows</a>. I chose 5.2 because at the time of this writing MSSQL extensions weren&#8217;t compatible with 5.3 yet (of course I found out the hard way after installing 5.3, and ended up downgrading). You can download the VC9 version (assuming you are using IIS and not Apache). It&#8217;s up to you if you want to download the thread safe or the non thread safe. The difference can be found <a href="http://www.iis-aid.com/articles/my_word/difference_between_php_thread_safe_and_non_thread_safe_binaries">here</a>. For this example I choose non thread safe.</p>
<p>4. Restart the WWW publishing service.</p>
<p>5. Download <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=61BF87E0-D031-466B-B09A-6597C21A2E2A&amp;displaylang=en">Microsoft SQL Server Driver for PHP</a>. Put the php_sqlsrv.dll (or php_sqlsrv_ts.dll if you installed the thread safe version of PHP) in the PHP extensions directory (default location will be C:\Program Files\PHP\ext).</p>
<p>6. Now edit the php.ini file in the PHP directory (default location will be C:\Program Files\PHP), and put the following where all the extensions are located at (near the bottom).</p>
<p style="padding-left: 30px;">Non thread safe: extension=php_sqlsrv.dll</p>
<p style="padding-left: 30px;">Thread safe: extension=php_sqlsrv_ts.dll.</p>
<p>7. Download and install the <a href="http://go.microsoft.com/fwlink/?LinkId=101877">Microsoft SQL Server Native Client</a> since my SQL server is remote (normally this would be already loaded if SQL is on the same machine as this server)</p>
<p>7. Restart the WWW publishing service.</p>
<p>8. Now lets verify that PHP and the MSSQL driver are loaded. Create a info.php file in your wwwroot and put the below code in file and save it. Now visit http://localhost/info.php, and you should see PHP information, including if the MSSQL extension loaded. That&#8217;s it. Now if you need to find out how to connect to MSSQL through PHP in code, reference the help file that came with the SQL server driver download.</p>
<p><code>&lt;?php</code></p>
<p><code> phpinfo()</code></p>
<p>?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonmohan.com/php/setting-up-a-windows-php-server-with-mssql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
