<?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>Binary Code &#187; Search Results  &#187;  chris</title>
	<atom:link href="http://www.postal-code.com/binarycode/search/chris/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://www.postal-code.com/binarycode</link>
	<description>A whole bunch of nought thought by Chris Cummer</description>
	<lastBuildDate>Tue, 31 Aug 2010 16:47:11 +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>Rspec with Rails3 beta and Rspec 2 beta</title>
		<link>http://www.postal-code.com/binarycode/2010/05/17/rspec-with-rails3-beta-and-rspec-2-beta/</link>
		<comments>http://www.postal-code.com/binarycode/2010/05/17/rspec-with-rails3-beta-and-rspec-2-beta/#comments</comments>
		<pubDate>Mon, 17 May 2010 18:22:42 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=324</guid>
		<description><![CDATA[The problem: running spec filename.rb against a project built on Rails 3 beta and using Rspec 2 beta generated the following error (I can&#8217;t imagine why there were any issues): /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217;: no such file to load &#8212; spec/adapters/mock_frameworks/rspec (LoadError) from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217; from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:197:in `load_dependency&#8217; from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217; from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner/options.rb:312:in `plugin_mock_framework&#8217; from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner/options.rb:138:in `run_examples&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>The problem: running </p>
<blockquote><p>
spec filename.rb
</p></blockquote>
<p>against a project built on Rails 3 beta and using Rspec 2 beta generated the following error (I can&#8217;t <em>imagine</em> why there were any issues):</p>
<blockquote><p>
/Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217;: no such file to load &#8212; spec/adapters/mock_frameworks/rspec (LoadError)<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:197:in `load_dependency&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta3/lib/active_support/dependencies.rb:209:in `require&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner/options.rb:312:in `plugin_mock_framework&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner/options.rb:138:in `run_examples&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner.rb:61:in `run&#8217;<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/gems/rspec-1.3.0/lib/spec/runner.rb:45<br />
	from /Users/chris/.rvm/gems/ruby-1.8.7-p249/bin/spec:19
</p></blockquote>
<p>As you can see from the error it is in fact not running the rspec beta but rather trying to use the system&#8217;s rspec 1.3.0. Problematic, that.</p>
<p>Turns out the solution was to use bundle* to run the individual spec (this, of course, assumes you&#8217;re managing your gems with <a href="http://github.com/wycats/bundler">Bundler</a>):</p>
<blockquote><p>
bundle exec rspec filename.rb
</p></blockquote>
<p>*In the project above I have a whole separate environment managed by <a href="http://rvm.beginrescueend.com/">RVM</a> specifically for the latest über-stable Ruby (ruby 1.8.7 (2010-01-10 patchlevel 249) as of this writing), the Rails and Rspec beta.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2010/05/17/rspec-with-rails3-beta-and-rspec-2-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smarty Gotcha: Spaces</title>
		<link>http://www.postal-code.com/binarycode/2009/02/16/smarty-gotcha-spaces/</link>
		<comments>http://www.postal-code.com/binarycode/2009/02/16/smarty-gotcha-spaces/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 21:48:19 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=277</guid>
		<description><![CDATA[One of the projects I&#8217;m working on uses Smarty as its templating engine. Frankly in a post-Rails/Merb/CakePHP/Django world Smarty is pretty painful to work with and its age and implementation restrictions become readily apparent&#8230; but that&#8217;s another post for another time. This post is about how spaces in Smarty templates might trip you up. Witness [...]]]></description>
			<content:encoded><![CDATA[<p>One of the projects I&#8217;m working on uses <a href="http://www.smarty.net/">Smarty</a> as its templating engine. Frankly in a post-Rails/Merb/CakePHP/Django world Smarty is pretty painful to work with and its age and implementation restrictions become readily apparent&#8230; but that&#8217;s another post for another time.</p>
<p>This post is about how spaces in Smarty templates might trip you up. Witness the following code from a Smarty template (yes, this is kind&#8217;a like PHP but less functional and less readable):</p>
<pre name="code" class="php">
&lt;img src="{$deletion_item->default_image(false)}" /&gt;
</pre>
<pre name="code" class="php">
&lt;img src="{$deletion_item->default_image( false )}" /&gt;
</pre>
<p>One would tend to think, or at least I tend to think, that those two lines of HTML/Smarty code would be functionally equivalent. They look the same, save for the second developer&#8217;s preference for some extra whitespace.</p>
<p>However example one works with Smarty, example two throws the following error:</p>
<blockquote class="code"><p>
<strong>Fatal error</strong>: Smarty error: [in /Users/chris/Sites/dreambank/templates/en/delete_item.tpl line 42]:<br />
syntax error: unrecognized tag: $deletion_item->default_image( false ) (Smarty_Compiler.class.php, line 446) in <strong>/Users/chris/Sites/dreambank/includes/smarty/Smarty.class.php</strong> on line <strong>1095</strong>
</p></blockquote>
<p>So, there you have it. There&#8217;s not much more to this than to say: when working with Smarty be very careful with your whitespace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2009/02/16/smarty-gotcha-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DreamBank for my birthday</title>
		<link>http://www.postal-code.com/binarycode/2008/10/20/dreambank-for-my-birthday/</link>
		<comments>http://www.postal-code.com/binarycode/2008/10/20/dreambank-for-my-birthday/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 02:41:44 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=262</guid>
		<description><![CDATA[Today&#8217;s my birthday and, as is inevitable with all birthdays, people ask &#8220;what would you like?&#8221; This year I&#8217;d like something a little different. Since January I&#8217;ve been working with a group of fantastic people to help create DreamBank, a web site who&#8217;s goal &#8211; and our hope &#8211; is to alter, for the better, [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s my birthday and, as is inevitable with all birthdays, people ask &#8220;what would you like?&#8221; This year I&#8217;d like something a little different.</p>
<p>Since January I&#8217;ve been working with a group of fantastic people to help create <a href="http://www.dreambank.org">DreamBank</a>, a web site who&#8217;s goal &#8211; and our hope &#8211; is to alter, for the better, the way in which we give each other gifts. DreamBank is designed to allow anyone to post their goals, or their needs, or their wants in a way that allows their friends, their family, and everyone else to help them achieve their objectives. No more mis-sized socks, no more unwanted DVDs, no more soon-to-be-lost gift cards. Just a goal and the means.</p>
<p>For my birthday I&#8217;d really like if you&#8217;d head over to <a href="http://www.dreambank.org">DreamBank</a>, check out the work we&#8217;ve been doing, read about the philosophy, sign up, create a dream and give it a try.</p>
<p><a href="http://www.dreambank.org">http://www.dreambank.org</a></p>
<p>Many thanks to you, on my birthday.<br />
Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/10/20/dreambank-for-my-birthday/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Me Meme</title>
		<link>http://www.postal-code.com/binarycode/2008/10/03/the-me-meme/</link>
		<comments>http://www.postal-code.com/binarycode/2008/10/03/the-me-meme/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 18:58:30 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=251</guid>
		<description><![CDATA[Via Obie Fernandez, the Me Meme. 1.Take a picture of yourself right now. 2. Don’t change your clothes, don’t fix your hair…just take a picture. (should be super-easy with Photobooth) 3. Post that picture with NO editing. 4 Post these instructions with your picture.]]></description>
			<content:encoded><![CDATA[<p>Via <a href="http://blog.obiefernandez.com/content/2008/10/the-me-meme.html">Obie Fernandez</a>, the Me Meme.<br />
<center><br />
<a href='http://www.postal-code.com/binarycode/wp-content/uploads/2008/10/me.jpg'><img src="http://www.postal-code.com/binarycode/wp-content/uploads/2008/10/me-300x225.jpg" alt="Chris Cummer" title="me" width="300" height="225" class="alignnone size-medium wp-image-252" /></a><br />
</center><br />
1.Take a picture of yourself right now.<br />
2. Don’t change your clothes, don’t fix your hair…just take a picture. (should be super-easy with Photobooth)<br />
3. Post that picture with NO editing.<br />
4 Post these instructions with your picture. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/10/03/the-me-meme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DreamBank is Hiring Again</title>
		<link>http://www.postal-code.com/binarycode/2008/10/01/dreambank-is-hiring-again/</link>
		<comments>http://www.postal-code.com/binarycode/2008/10/01/dreambank-is-hiring-again/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 16:51:46 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=248</guid>
		<description><![CDATA[If you&#8217;re in Vancouver and you&#8217;re looking for a great job on an interesting project: DreamBank is hiring. http://www.dreambank.org DreamBank is about creating an alternative to traditional gift giving in a way that helps both the planet and important social causes. We&#8217;re currently looking for one more software developer with solid experience developing MySQL-driven PHP [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re in Vancouver and you&#8217;re looking for a great job on an interesting project:</p>
<blockquote><p>
DreamBank is hiring.</p>
<p>http://www.dreambank.org</p>
<p>DreamBank is about creating an alternative to traditional gift giving in a way that helps both the planet and important social causes. We&#8217;re currently looking for one more software developer with solid experience developing MySQL-driven PHP web sites (aka LAMP).</p>
<p>You&#8217;ll be working with the head developer to improve and solidify  the current codebase, scope and implement new features, and help  plan the technical growth of the company and site.</p>
<p>Real-world Ruby/Rails experience is also definitely an asset as we  make considerable use of Rails at DreamBank.</p>
<p>If you&#8217;re interested, please send your resume and cover letter in  PDF format as well as a links to examples of software you&#8217;ve worked  on, to info@dreambank.org.</p>
<p>Regards<br />
Chris Cummer<br />
Technical Director, DreamBank</p>
<p>Location: Yaletown, Vancouver<br />
Compensation: 60-70k on contract, depending on experience.<br />
This is a contract job.
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/10/01/dreambank-is-hiring-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ultrasphinx Bootstrap Error</title>
		<link>http://www.postal-code.com/binarycode/2008/08/07/ultrasphinx-bootstrap-error/</link>
		<comments>http://www.postal-code.com/binarycode/2008/08/07/ultrasphinx-bootstrap-error/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 21:28:30 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/rails]]></category>
		<category><![CDATA[/dev/ruby]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=238</guid>
		<description><![CDATA[You&#8217;re installing Ultraspinx (perhaps per these instructions from Inoshi, which are the best I&#8217;ve found thus far) and you run into this error when time comes to bootstrap your installation: ~/Sites/ticklists/: sudo rake ultrasphinx:bootstrap &#8211;trace (in /Users/chris/Sites/ticklists) ** Invoke ultrasphinx:bootstrap (first_time) ** Invoke ultrasphinx:_environment (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute ultrasphinx:_environment [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;re installing Ultraspinx (perhaps <a href="http://blog.insoshi.com/2008/07/17/searching-a-ruby-on-rails-application-with-sphinx-and-ultrasphinx/">per these instructions</a> from <a href="http://portal.insoshi.com/">Inoshi</a>, which are the best I&#8217;ve found thus far) and you run into this error when time comes to bootstrap your installation:</p>
<blockquote><p>
~/Sites/ticklists/: sudo rake ultrasphinx:bootstrap &#8211;trace<br />
(in /Users/chris/Sites/ticklists)<br />
** Invoke ultrasphinx:bootstrap (first_time)<br />
** Invoke ultrasphinx:_environment (first_time)<br />
** Invoke environment (first_time)<br />
** Execute environment<br />
** Execute ultrasphinx:_environment<br />
** Invoke ultrasphinx:configure (first_time)<br />
** Invoke ultrasphinx:_environment<br />
** Execute ultrasphinx:configure<br />
rake aborted!<br />
You have a nil object when you didn&#8217;t expect it!<br />
You might have expected an instance of ActiveRecord::Base.<br />
The error occurred while evaluating nil.[]
</p></blockquote>
<p>I couldn&#8217;t find this one in the google anywhere. Turns out the cause of this is defining non-existent properties for indexing on your models (perhaps I&#8217;m the only one dumb enough to do that). </p>
<p>You&#8217;ll know if this is the cause because you&#8217;ll see something akin to this in your Rails console:</p>
<blockquote><p>
** ultrasphinx: warning: field f is not present in User<br />
** ultrasphinx: warning: field descritpion is not present in Profile
</p></blockquote>
<p>Remove (or fix the spelling of) those and everything should work hunky-dory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/08/07/ultrasphinx-bootstrap-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wanted: Software Project Manager in Vancouver</title>
		<link>http://www.postal-code.com/binarycode/2008/05/11/wanted-software-project-manager-in-vancouver/</link>
		<comments>http://www.postal-code.com/binarycode/2008/05/11/wanted-software-project-manager-in-vancouver/#comments</comments>
		<pubDate>Mon, 12 May 2008 01:41:53 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/?p=192</guid>
		<description><![CDATA[Hello all, Update: Position filled. Thanks to all who applied. Dreambank.org is looking to hire a software project manager in Vancouver to help chart and manage the post-launch development and growth of a funded web start-up that&#8217;s just about to go live. Said PM would be responsible for determining the future feature-set and growth of [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.postal-code.com/binarycode/wp-content/uploads/2008/05/hiring.jpg" alt="" title="hiring" width="145" height="180" class="alignright size-full wp-image-193" align="right" />Hello all,</p>
<p><strong>Update:</strong> Position filled. Thanks to all who applied.</p>
<p>Dreambank.org is looking to hire a software project manager in Vancouver to help chart and manage the post-launch development and growth of a funded web start-up that&#8217;s just about to go live. </p>
<p>Said PM would be responsible for determining the future feature-set and growth of the site, working with me (the Tech Director) to plan the schedule and deliver the features, work with marketing, with the customers, and so forth. Any PM worth their salt will be able to describe this job position far better than I (and if you&#8217;re off-put by that remark you&#8217;re probably not the right fit, sorry.)</p>
<p>Said person must have successfully managed and delivered at least one relatively sizable commercial software project in the past as the PM. That is the minimum requirement. No developers looking to advance their careers or PMs from other industries looking to get into software. You know software, and you know you know it.</p>
<p>If you sound like this person and you live in Vancouver and you&#8217;re interested and think you&#8217;re qualified, kindly get in touch with me at either chris@postal-code.com or chris@dreambank.org. I&#8217;d love to talk to you, fill you in and find out more about you.</p>
<p>Cheers<br />
Chris</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/05/11/wanted-software-project-manager-in-vancouver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 7.10, apt-get and build-essential</title>
		<link>http://www.postal-code.com/binarycode/2008/01/08/ubuntu-710-apt-get-and-build-essential/</link>
		<comments>http://www.postal-code.com/binarycode/2008/01/08/ubuntu-710-apt-get-and-build-essential/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 00:56:09 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/2008/01/08/ubuntu-710-apt-get-and-build-essential/</guid>
		<description><![CDATA[If you find yourself doing this under Ubuntu 7.10 &#8220;Gutsy Gibbon&#8221;: chris@karnak:~$ sudo apt-get install build-essential there&#8217;s a good chance it will fail with this error: Failed to fetch cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/pool/main/g/gcc-4.1/g++-4.1_4.1.2-16ubuntu2_i386.deb Hash Sum mismatch If so, open up your sources file: chris@karnak:~$ sudo nano /etc/apt/sources.list and comment out the [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself doing this under Ubuntu 7.10 &#8220;Gutsy Gibbon&#8221;:</p>
<blockquote><p>
chris@karnak:~$ sudo apt-get install build-essential
</p></blockquote>
<p>there&#8217;s a good chance it will fail with this error:</p>
<blockquote><p>
Failed to fetch cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/pool/main/g/gcc-4.1/g++-4.1_4.1.2-16ubuntu2_i386.deb Hash Sum mismatch
</p></blockquote>
<p>If so, open up your sources file:</p>
<blockquote><p>
chris@karnak:~$ sudo nano /etc/apt/sources.list
</p></blockquote>
<p>and comment out the line that references the CD-ROM (its probably the first one):</p>
<blockquote><p>
deb cdrom:[Ubuntu 7.10 _Gutsy Gibbon_ - Release i386 (20071016)]/ gutsy main restricted
</p></blockquote>
<p>Rebuild your repositories:</p>
<blockquote><p>
chris@karnak:~$ sudo apt-get dist-upgrade
</p></blockquote>
<p>and then try re-running the build-essential command. It ought to work now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2008/01/08/ubuntu-710-apt-get-and-build-essential/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Leopard Also Breaks PHP</title>
		<link>http://www.postal-code.com/binarycode/2007/11/12/leopard-also-breaks-php/</link>
		<comments>http://www.postal-code.com/binarycode/2007/11/12/leopard-also-breaks-php/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 02:38:37 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/2007/11/12/leopard-also-breaks-php/</guid>
		<description><![CDATA[Today I got back to work on an old open-source PHP project called Drop Bocks, a simple file upload utility. Imagine my surprise in discovering that what used to work flawlessly under OS X 10.4 dies an ugly death under OS X 10.5: Fatal error: Call to undefined function imagecreatefromjpeg() It seems that in addition [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got back to work on an old open-source PHP project called <a href="http://www.postal-code.com/dropbocks/">Drop Bocks</a>, a simple file upload utility. Imagine my surprise in discovering that what used to work flawlessly under OS X 10.4 dies an ugly death under OS X 10.5:</p>
<blockquote class="code"><p>
<strong>Fatal error:</strong> Call to undefined function imagecreatefromjpeg()
</p></blockquote>
<p>It seems that in addition to damaging any installation of MySQL and Apache the upgrade to 10.5 also over-wrote my PHP install with an inferior, no-GD included version, which is a big feckin&#8217; problem Apple.</p>
<p>Some googling turned up the following simple (<- that's sarcasm) solution to fix Apple's installation fubar:</p>
<blockquote class="code"><p>
Okay, here is the complete instruction on how to do this. Michel L already posted a very good message on how to build PHP with GD enabled, so i just combine all the answers in one step-by-step guide.</p>
<p>1. Download the Apache2 source from http://httpd.apache.org/download.cgi (latest version is 2.2.6) and extract it.<br />
2. Open Terminal and go to that directory. If you extract sources into your Downloads folder, type &#8220;cd ~/Downloads/httpd-2.6.6&#8243; and hit return<br />
3. Type &#8220;./configure &#8211;enable-layout=Darwin &#8211;enable-mods-shared=all&#8221; and hit return<br />
4. Wait for the process to complete and then type &#8220;make&#8221; and return<br />
5. Wait for the process to complete and then type &#8220;sudo make install&#8221; and return</p>
<p>Now you have Apache2 built and installed and it should run perfectly.</p>
<p>Then, follow the Michel L instructions. I will copy them here with several modifications:</p>
<p>Install libjpeg ***<br />
Get latest Stable SRC:</p>
<p>http://www.ijg.org/files/</p>
<p>tar zxvf jpegsrc.v6b.tar.gz</p>
<p>cd jpeg-6b</p>
<p>cp /usr/share/libtool/config.sub .</p>
<p>cp /usr/share/libtool/config.guess .</p>
<p>[<strong>Update:</strong> WordPress fiddles with double-dashes so the compiler flags in the following statements are incorrect (ie: –sysconfdir=/etc should be preceded by two dashes, not one). In the comments Mark has posted a corrected version down in the comments that you should follow. I'd correct them in the article but they are in fact correct in the article content; it appears WordPress mucks with them elsewhere, alas. - Chris]</p>
<p>env CFLAGS=&#8221;-O -g -arch i386 -arch ppc&#8221; LDFLAGS=&#8221;-arch i386 -arch ppc&#8221; ./configure &#8211;prefix=/usr &#8211;sysconfdir=/etc &#8211;localstatedir=/var &#8211;mandir=/usr/share/man &#8211;enable-shared &#8211;enable-static</p>
<p>make</p>
<p>sudo make install</p>
<p>sudo ranlib /usr/local/lib/libjpeg.a</p>
<p>Install libpng ***<br />
Get latest Stable SRC with config script</p>
<p>http://www.libpng.org/pub/png/libpng.html</p>
<p>tar jxvf libpng-1.2.22.tar.bz2</p>
<p>cd libpng-1.2.22</p>
<p>env CFLAGS=&#8221;-O -g -arch i386 -arch ppc&#8221; LDFLAGS=&#8221;-arch i386 -arch ppc&#8221; ./configure &#8211;prefix=/usr &#8211;sysconfdir=/etc &#8211;localstatedir=/var &#8211;mandir=/usr/share/man &#8211;disable-dependency-tracking</p>
<p>make</p>
<p>sudo make install</p>
<p>sudo ranlib /usr/local/lib/libpng.a</p>
<p>The same procedure with PHP sources, and configure line should look like this:</p>
<p>./configure &#8211;prefix=/usr &#8211;sysconfdir=/etc &#8211;localstatedir=/var &#8211;mandir=/usr/share/man &#8211;infodir=/usr/share/info &#8211;with-apxs2=/usr/sbin/apxs &#8211;with-curl &#8211;with-gd &#8211;enable-exif &#8211;enable-fastcgi &#8211;enable-zip &#8211;with-jpeg-dir=/usr/src/libjpeg &#8211;with-ldap=/usr &#8211;with-kerberos=/usr &#8211;with-zlib=/usr &#8211;enable-ftp &#8211;enable-sockets &#8211;with-iodbc=/usr &#8211;with-config-file-path=/etc &#8211;with-openssl &#8211;with-xmlrpc &#8211;with-xsl=/usr</p>
<p>If you have MySQL installed, add the following options to the PHP configure command (let&#8217;s assume you have your MySQL in /usr/local/mysql directory):<br />
&#8211;with-mysql=/usr/local/mysql &#8211;with-mysql-sock=/var/mysql &#8211;with-mysqli=/usr/local/mysql/bin/mysql_config</p>
<p>Then, run &#8220;make -j3&#8243;</p>
<p>And then, as usual, &#8220;sudo make install&#8221;</p>
<p>Note that PHP configure and build processes will take much time even on fast machine.</p>
<p>After all, go to &#8220;System Preferences > Sharing&#8221; and uncheck &#8220;Web Sharing&#8221; checkbox, then wait a bit and check it again. Now you should have your Apache+PHP up and running.
</p></blockquote>
<p>Screw that. From now on I&#8217;m using my Ubuntu machine for all PHP development until Apple finally starts shipping a decent development install or at the very least ships an OS that won&#8217;t fuck with mine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2007/11/12/leopard-also-breaks-php/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Leopard Breaks Apache &amp; MySQL</title>
		<link>http://www.postal-code.com/binarycode/2007/10/29/leopard-breaks-apache-mysql/</link>
		<comments>http://www.postal-code.com/binarycode/2007/10/29/leopard-breaks-apache-mysql/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 21:50:12 +0000</pubDate>
		<dc:creator>chris</dc:creator>
				<category><![CDATA[/dev/random]]></category>

		<guid isPermaLink="false">http://www.postal-code.com/binarycode/2007/10/29/leopard-breaks-apache-mysql/</guid>
		<description><![CDATA[It seems that with Leopard Apple has decided to go forward with Apache2 henceforth. This is great but if you&#8217;re like me and do all your development on your local machine using Apache &#038; PHP and all that jazz there&#8217;s a good chance that installing Leopard hosed your local webserver and PHP install to some [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that with Leopard Apple has decided to go forward with Apache2 henceforth. This is great but if you&#8217;re like me and do all your development on your local machine using Apache &#038; PHP and all that jazz there&#8217;s a good chance that installing Leopard hosed your local webserver and PHP install to some degree.</p>
<p>The errors I was getting were:</p>
<blockquote class="code"><p>
[error] [client 10.0.1.198] client denied by server configuration: /Users/chris/Sites/index.html
</p></blockquote>
<p>AKA: the dreaded 403.</p>
<p>Solution: In the Terminal do the following:</p>
<blockquote class="code"><p>
sudo cp /etc/httpd/users/chris.conf /etc/apache2/users/
</p></blockquote>
<p>Replacing the name of your user for &#8220;chris&#8221;. Restart Apache2:</p>
<blockquote class="code"><p>
sudo apachectl restart
</p></blockquote>
<p>You should at least now be able to see your files, even if the PHP ones are showing up as text.</p>
<p>To get PHP working again, once more in the Terminal:</p>
<blockquote class="code"><p>
sudo nano /etc/apache2/httpd.conf
</p></blockquote>
<p>Find the line</p>
<blockquote class="code"><p>
#LoadModule php5_module libexec/apache2/libphp5.so
</p></blockquote>
<p>and uncomment it (ie: delete the # from the front). Save that file. Restart Apache2 per above.</p>
<p>Basic PHP should now be working, but in my case phpMyAdmin wasn&#8217;t because once again the location of mysql.sock has changed.</p>
<p>To get that working again, follow the instructions I posted over a year ago in <a href="http://www.postal-code.com/mrhappy/blog/2006/02/23/phpmyadmin-error-2002-the-server-is-not-responding-and-os-x-1044/">&#8220;phpMyAdmin, ‘Error #2002 &#8211; The server is not responding’, and OS X 10.4.4&#8243;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.postal-code.com/binarycode/2007/10/29/leopard-breaks-apache-mysql/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
