<?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>JimmyLi.net &#187; ntwdblib</title>
	<atom:link href="http://jimmyli.net/tag/ntwdblib/feed/" rel="self" type="application/rss+xml" />
	<link>http://jimmyli.net</link>
	<description>Join the dark side</description>
	<lastBuildDate>Wed, 08 Sep 2010 07:41:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP Unable to Connect to MSSQL</title>
		<link>http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/</link>
		<comments>http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 07:15:59 +0000</pubDate>
		<dc:creator>Jimmy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[ntwdblib]]></category>

		<guid isPermaLink="false">http://jimmyli.net/?p=28</guid>
		<description><![CDATA[Update: This article is considered outdated, and is only valid for PHP versions before 5.3. I’ve started an IIS Tutorial Series on Talking to SQL Server with PHP on IIS, which is valid for any versions of PHP 5.2.4 and later. I have been pulling my hair trying for many hours to connect to a [...]]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:</strong> This article is considered outdated, and is only valid for PHP versions before 5.3. I’ve started an IIS Tutorial Series on <a href="http://jimmyli.net/2010/08/talking-to-sql-server-with-php-on-iis/">Talking to SQL Server with PHP on IIS</a>, which is valid for any versions of PHP 5.2.4 and later.</em></p>
<p>I have been pulling my hair trying for many hours to connect to a MSSQL server remotely with PHP.  I was able to connect using ODBC but I wanted a more elegant and native solution.  Trying to connect using PHP&#8217;s MSSQL database library constantly gave me the error:</p>
<pre class="brush: sql;">Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 172.xxx.xxx.xxx</pre>
<p>I&#8217;ve tried using the computer name and several other solutions.  Upon doing a lot of research and reading the user notes on the PHP website, and trying out several solutions before finding out a working solution.  I&#8217;ve found that the file ntwdblib.dll packaged with PHP5 (currently 5.2.9-1) is an old version (2000.2.8.0).  Most people suggested replacing it with the later version, 2000.80.194.0.</p>
<p>Click here to download this version of the file: <a href="http://jimmyli.net/wp/wp-content/uploads/2009/03/ntwdblib.zip">ntwdblib.dll</a></p>
<p>I&#8217;ve replaced the file and restarted my IIS webserver and the connection was successful!  I hope this helps for those searching for the solution.</p>
]]></content:encoded>
			<wfw:commentRss>http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
