<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>php &#8211; luke arms</title>
	<atom:link href="https://tech.lkrms.org/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://tech.lkrms.org</link>
	<description>just a nerd with &#34;mild OCD tendencies&#34;</description>
	<lastBuildDate>Fri, 18 Aug 2017 01:01:00 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.6.12</generator>

<image>
	<url>https://tech.lkrms.org/wp-content/uploads/2016/06/cropped-Logo-Letters-WB-Circle-2-32x32.png</url>
	<title>php &#8211; luke arms</title>
	<link>https://tech.lkrms.org</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">152348619</site>	<item>
		<title>PHP with FreeTDS on macOS Sierra</title>
		<link>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/</link>
					<comments>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/#comments</comments>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Sun, 17 Nov 2013 06:13:51 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[macOS server]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql server]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=1060</guid>

					<description><![CDATA[<p>Need your macOS-hosted PHP code to talk to Microsoft SQL Server? Here’s the guide I couldn’t find when I needed it. Or you could just download my macOS-ready mssql.so (compiled for PHP 5.6.30 on macOS Sierra 10.12.6) and skip to the end. (18 Aug 2017) Previous versions are available below. Prerequisites Xcode with command line &#8230; <a href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/" class="more-link">Continue reading <span class="screen-reader-text">PHP with FreeTDS on macOS Sierra</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/">PHP with FreeTDS on macOS Sierra</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Need your macOS-hosted PHP code to talk to Microsoft SQL Server? Here’s the guide I couldn’t find when I needed it.</p>
<p><em>Or you could just download my <a href="http://delivr.lkrms.org/index.php?f=YJvofgVtKhBgO2It">macOS-ready mssql.so</a> (compiled for PHP 5.6.30 on macOS Sierra 10.12.6) and skip to the end. <strong>(18 Aug 2017)</strong></em></p>
<p><em>Previous versions are available below.</em></p>
<h3 id="prerequisites">Prerequisites</h3>
<ul>
<li>Xcode with command line tools (these are installed when you first run Xcode)</li>
<li>Latest autoconf source from <a href="http://ftp.gnu.org/gnu/autoconf/">http://ftp.gnu.org/gnu/autoconf/</a> <em>(or Homebrew installed)</em></li>
<li>Latest FreeTDS source from <a href="http://www.freetds.org/">http://www.freetds.org/</a> <em>(or Homebrew installed)</em></li>
<li>Source for the <a href="http://www.php.net/releases/">same version of PHP</a> that ships with macOS (5.6.30 on macOS Sierra 10.12.6; run `php -v` from a terminal if unsure)</li>
</ul>
<h3 id="buildandinstallautoconf">Build and install autoconf</h3>
<p>If you’re a <a href="http://brew.sh/">Homebrew</a> user, <code>brew install autoconf</code> is easier than the following.</p>
<pre>$ tar zxf autoconf-latest.tar.gz 
$ cd autoconf-2.69
$ ./configure 
$ make
$ sudo make install
</pre>
<h3 id="buildandinstallfreetds">Build and install FreeTDS</h3>
<p>FreeTDS is on Homebrew too: <code>brew install freetds</code></p>
<p>Alternatively:</p>
<pre>$ tar zxf freetds-patched.tar.gz
$ cd freetds-1.00.54
$ ./configure 
$ make
$ sudo make install
</pre>
<h3 id="buildandinstallmssql.so">Build and install mssql.so</h3>
<p>Don’t worry, unlike some of the Internets will tell you, there’s no need to rebuild PHP itself. Nor do you need to write an essay after <code>.configure</code>.</p>
<p><em><strong>Update (18 Aug 2017):</strong> phpize doesn&#8217;t seem to work out-of-the box anymore. If it can&#8217;t find the files it needs (you&#8217;ll see grep errors), try adding a symbolic link like this: <code>sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/php/ /usr/include/php</code>. <a href="https://www.imore.com/el-capitan-system-integrity-protection-helps-keep-malware-away">System Integrity Protection will need to be disabled first.</a></em></p>
<p>Here goes:</p>
<pre>$ tar zxf php-5.6.30.tar.gz
$ cd php-5.6.30/ext/mssql
$ phpize
$ ./configure --with-php-config=/usr/bin/php-config --with-mssql=/usr/local/
$ make
$ sudo cp modules/mssql.so /usr/lib/php/extensions/no-debug-non-zts-20131226/
</pre>
<p>If you have trouble with the final step, System Integrity Protection is probably enabled. <a href="https://www.imore.com/el-capitan-system-integrity-protection-helps-keep-malware-away">Disable it temporarily.</a></p>
<p>Finally, add this line to your <code>php.ini</code> (probably in <code>/etc/php.ini</code>):</p>
<pre>extension=mssql.so
</pre>
<p>And restart Apache if necessary.</p>
<p>Done!</p>
<h3>Previous versions</h3>
<p>If you&#8217;re running an old version of macOS, you might find one of these binaries helpful:</p>
<ul>
<li>mssql.so compiled for PHP 5.4.17 on OS X Mavericks 10.9 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=K50P3jASK8yhUDfA">here.</a> <strong>(17 Nov 2013)</strong></li>
<li>mssql.so compiled for PHP 5.4.24 on OS X Mavericks 10.9.4 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=6ib06l6EgW3287l4">here.</a> <strong>(6 Jul 2014)</strong></li>
<li>mssql.so compiled for PHP 5.5.14 on OS X Yosemite 10.10.1 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=8ZQu48VhUvw3l4ze">here.</a> <strong>(22 Dec 2014)</strong></li>
<li>mssql.so compiled for PHP 5.5.27 on OS X Yosemite 10.10.5 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=g1pDzVAT_uF_psdi">here.</a> <strong>(16 Sep 2015)</strong></li>
</ul>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/">PHP with FreeTDS on macOS Sierra</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1060</post-id>	</item>
		<item>
		<title>PHP Addiction</title>
		<link>https://tech.lkrms.org/php-addiction/</link>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Fri, 29 Jun 2012 14:05:02 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://lkrms.org/php-addiction/</guid>

					<description><![CDATA[<p>PHP Addiction Marco Arment of Instapaper fame explains why he keeps using PHP, even though it’s crap. I’m in exactly the same boat.</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-addiction/">PHP Addiction</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://www.marco.org/2012/06/29/php-addiction">PHP Addiction</a></p>
<p>Marco Arment of Instapaper fame explains why he keeps using PHP, even though it’s crap. I’m in exactly the same boat.</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-addiction/">PHP Addiction</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">53</post-id>	</item>
		<item>
		<title>PHP sucks</title>
		<link>https://tech.lkrms.org/php-sucks/</link>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Tue, 10 Apr 2012 04:25:30 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://lkrms.org/php-sucks/</guid>

					<description><![CDATA[<p>PHP sucks But its ubiquity is hard to beat. So it’s still my language of choice for, uh, “ubiquitous” projects. (Click through for the most thorough critique of PHP in existence.)</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-sucks/">PHP sucks</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/">PHP sucks</a></p>
<p>But its ubiquity is hard to beat. So it’s still my language of choice for, uh, “ubiquitous” projects.</p>
<p>(Click through for the most thorough critique of PHP in existence.)</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-sucks/">PHP sucks</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">73</post-id>	</item>
	</channel>
</rss>
