<?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>#&#124;Hash-Pipe &#187; OS X</title>
	<atom:link href="http://hash-pipe.com/category/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://hash-pipe.com</link>
	<description>The collective musings of a few real-world programmers.</description>
	<lastBuildDate>Thu, 09 Jul 2009 03:47:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP 5 and XDebug on OS X Leopard</title>
		<link>http://hash-pipe.com/2008/08/php-5-and-xdebug-on-os-x-leopard/</link>
		<comments>http://hash-pipe.com/2008/08/php-5-and-xdebug-on-os-x-leopard/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 07:37:20 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://hash-pipe.com/?p=5</guid>
		<description><![CDATA[It was another frustrating night in the land of X. I went to install XDebug on my Leopard desktop and realized that PHP was no longer running. Interesting, since I know I had the Entropy.ch package installed and running a while back, so what happened? I figured something must have broken during an upgrade, so [...]]]></description>
			<content:encoded><![CDATA[<p>It was another frustrating night in the land of X. I went to install XDebug on my Leopard desktop and realized that PHP was no longer running. Interesting, since I know I had the <a href="http://www.entropy.ch/software/macosx/">Entropy.ch package</a> installed and running a while back, so what happened? I figured something must have broken during an upgrade, so I poked around my machine and the Entropy user forums to try and resolve the problem.</p>
<p>I ended up reinstalling the Apache 2 version of the PHP 5 package, but found the assertion in the instructions that &#8220;PHP should now be up and running&#8221; to be incorrect. For some reason the installer script did not add the necessary line to the httpd.conf file, located at /etc/apache2/httpd.conf for me:<br />
<code>LoadModule php5_module /usr/local/php5/libphp5.so</code><br />
I added this, restarted the server via the Sharing control panel, and&#8230; nothing. Now Apache wasn&#8217;t even running, despite the green light in the control panel. Running &#8220;apachectl configtest&#8221; revealed the following error:<br />
<code>httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/php5/libphp5.so into server: dlopen(/usr/local/php5/libphp5.so, 10): no suitable image found.  Did find:\n\t/usr/local/php5/libphp5.so: no matching architecture in universal wrapper</code><br />
Ah. OK. This was sounding familiar, and I followed the instructions in this <a href="http://www.entropy.ch/phpbb2/viewtopic.php?t=3074">forum post</a>, Problem 2 and Problem 3, to get Apache to play nice with the Entropy package. After this I added the following lines to /usr/local/php5/lib/php.ini to point it to my XDebug .so, installed using &#8220;sudo pecl install xdebug&#8221;:<br />
<code>[xdebug]<br />
zend_extension=/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so</code><br />
&#8230; and all was well. Or was it?</p>
<p>It seems that the problem here is that as part of Leopard, Apple switched over to using a 64-bit version of Apache 2. This was fine for them because their <span style="text-decoration: line-through;">crippled</span> bundled PHP 5 extension was updated to match. However, I was unaware of the issue and since I don&#8217;t use my desktop server much, it took me a <span style="text-decoration: underline;">long</span> time to notice&#8230; during which time my PHP code was open to the world.</p>
<p>I want someone to blame here but the only person to blame is really myself&#8230; using non-standard packages, and not at least checking my external interfaces after a fairly major upgrade. Let this be a lesson: You never know when a seemingly simple upgrade is going to cause a huge security hole, even on your little home machine. Always take the responsibility of hosting seriously.</p>
<p>P.S. <a href="http://www.entropy.ch/home/">Marc Liyanage</a>, where did you go? If you&#8217;re not going to update the packages anymore, please let someone take over for you&#8230; there are a lot of books and tutorials pointing to your packages&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://hash-pipe.com/2008/08/php-5-and-xdebug-on-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
