PHP 5.3 on Mac OS X 10.5

Published on: July 31, 2008   

Being the recent (and appreciative) recipient of a MacBook I've been getting all the usual development tools installed. Everything went pretty much as expected until I got to where I wanted to compile PHP5. Not just any flavor of PHP5 but a snapshot of PHP 5.3. While this focuses on 5.3 you'd have to do the same song and dance for the PHP 5.2 source. Why?

If there is anything you should gleam from this article for future reference, Leopard comes with a 64bit Apache installation. Thus if I go into the PHP 5.3 source and tried, say:

#>./configure --with-png --with-tiff --with-jpeg \
--with-gd --enable-soap --with-apxs2 

It my configure, may even compile but when you install and restart Apache you'd get errors about the PHP module being of the wrong architecture. I confirmed this using the "file" command. After that I started down the path of "well, let's just compile to 64 bit". I did find references that suggest trying to add CFLAGS="-arch x86_64" to your configure statement but that didn't work either. You might be able to get this working if you dink with it enough, however, I was in "get it working" mode. I did find this blog post by Marc Liyanage which gives more details into what is going on. Turns out this 64-bit problem is much bigger than just PHP because I was unable to get the fink libraries for stuff like libpng, etc to compile to 64bit. Now maybe you can do this by downloading the individual packages and compiling them one-by-one but I'm far too lazy for that.

The fix? Run Apache in 32-bit mode. Not knowing anything about Mac and that some binaries are compiled to support multiple architectures I was hanging out in #apache on irc.freenode.net trying to figure out the best way to compile Apache under OS X. At the same time I posted to macosxhints.com and got a very simple, elegant answer that didn't require me to download and recompile Apache:

sudo cp /usr/sbin/httpd /usr/sbin/httpd-fat
sudo lipo /usr/sbin/httpd -thin i386 -output /usr/sbin/httpd
After that using my standard ./configure worked just fine and I now have PHP 5.3a1 working beautifully. That said, I'd love to hear from anybody that has managed to get PHP 5.3 (and required libraries) compiled using the 64-bit Apache.

Remember When - Pepsi Bottles

Published on: July 02, 2008   

Any of you remember growing up when Pepsi was sold in glass bottles which were held in wood cases? I got to thinking of this on the way to work today, after hearing the distinct "pop" of a bottle rocket, "I wonder if they even used a bottle?". This got me to thinking back to my childhood and one of the many happy times...Independence Day. I can remember the summer heat requiring a kid to suck down an ice cold Pepsi which then left a bottle perfect for launching bottle rockets. I distinctly remember the Pepsi emblem, a circle - half red, half blue - cut in half by the word "Pepsi" charred by childhood fun. I hope my kids have memories like this when they grow up!

Purple Martin Hatchlings!

Published on: June 23, 2008   

And just like that we have at least 3 purple martin chicks! I just posted an update that we had eight eggs. Now we have no more than five! Today Kate called me at work to tell me the kids found a shell in the yard. I immediately suspected the worst that maybe a House Sparrow and pinned (cracked) one of the eggs. To my surprise there was no such tragedy and we had the two chicks shown! That said we now have only 22 days to enjoy the birds before we have to leave the nest undisturbed. Why 22 days? Well somewhere recently I read that is the magic time when the chicks will be strong enough to flee and that lowering the birdhouse can spook the birds and lead to disaster. That means we have roughly 5 nest checks we can do between now and then. In the meantime I hope Mother Nature is kind to the birds...no sparrows, no starlings and hopefully the heat won't be too bad.

Weber's Smokey Mountain (WSM)

Published on: June 21, 2008   

Those following me on Twitter were the first to learn that today I am the proud owner of a new smoker. In the world of smoking you have a lot of choices from the affordable to the holy grail of smokers. Being a software guy, it really all came down to what were my requirements (needs):

  • I don't want it on my deck. I've already got my gas Brinkman ProSeries 4775 on the deck and a smoker would only clutter it.
  • I don't want anything that would minimize the use of my exiting Brinkman gas grill. I love that grill so I only need something that does a good job smoking
  • It must be light. Depending on wind I will smoke meat either on a small concrete slab in the back yard or in the drive way. I want the ability to move the smoker without doing further damage to my already bad back
  • It must be a top-notch smoker. My palette sometimes screams for good smoked food and while I have smoked on my gas grill with wood chips, it's just not the same.
  • It must be either wood or charcoal. I know, wood is all the smoking experts use but wood smokers often involve larger, hard to move units. I didn't consider electric because it is hard to get them to reach those upper temperatures sometimes required.

I'm happy to say that based on my research the Weber Smokey Mountain, referred to as the WSM by it's adoring fans. I know, I know...a touch pricy for a bullet, eh? Why not one of the $40 Brinkman's? It all comes down to quality. This site convinced me I was making the right decision. Being a fan of collaboration in software it only seemed fitting that the Virtual Weber Bullet site provided the same thing for WSM owners. Now, granted I haven't even assembled this unit (I did ensure all parts where in working order out-da-box. However over the coming weeks I promise to post my experiences with this unit. It's been a long time since I've been excited about buying anything...I hope it all lives up to my expectations.

Purple Martin Update

Published on: June 18, 2008   

It's been a long time since I've posted an update on our Purple Martin Bird house. Right now I have nothing but good news. We have at least three nesting pair, one pair on the west-facing side and at least 2 pair on the east-facing side. I'm not sure about exact numbers actually living there because I can't see the east-facing side. Right now that side has three complete or nearly complete nests. I have two nests, one on each side with eggs. On pair laid eggs just last week and the other pair the week prior. Both nests with eggs have green leaves in them which I found a bit odd...apparently others do too. The picture shown is of one of those nests. Our guess is we should have you hatching the next couple of weeks which should be interesting.

Making Memories in God's Country

Published on: June 14, 2008   

Every year I try hard to get close friends and family together to enjoy the outdoors. This often takes many forms from the simple fishing trip, a walk in the woods mushroomin', a short hunt or, like this past Memorial Day weekend, a healthy dose of camping. No, not just any type of camping where you pick some random park and hang out. We're talking God's Country, Northeast Iowa where limestone bluffs, clean, small streams and classic Iowa towns give you plenty to do like canoing, fishing, birdwatching and a kids versus adults game of kickball. This past weekend was unbelievable!

You have to immediately understand why this part of the state is such an attraction for anybody that loves the outdoors. The image to the right is literally across from our campground. Imagine how relaxed you'd be hearing the trickle of the stream, echoes of morning songs sung by birds and he shear beauty of such a perfectly sculpted work of art! Another reason this part of the country is so special is because this is where my mom took my sister and I many times. Gone now two years this coming Father's Day, the memories I have of my mom over so many years up there gives me a strong spiritual connection with her everytime I visit. I can only hope that everybody reading this has such a place, somewhere you can go to clear mind, get right and focus on what is truly important in life. That's exactly what I did!

Book Review: Pro PHP

Published on: June 10, 2008   

On my flight to the DC PHP Conference in Washington D.C. I had a chance to read a copy of Pro PHP: Patterns, Frameworks, Testing and More written by Kevin McArthur. I've never written a book, I clearly don't have a first hand appreciation for the amount of work that undoubtedly goes on under the hood. Given that I will try to be as constructive with this review as possible.

PHP SOAP Toolkit

Published on: June 03, 2008   

Michael Tutty, a friend and co-worker, gave the below talk at the DC PHP Conference . PHP SOAP Toolkit is a handy way to fill-in some of the "missing" pieces of SOAP support in PHP that make implementing both SOAP services and clients in a way that is inter-operable with other languages like .NET and Java. If you are interested in getting your feet wet with PHP and SOAP particularly with contract-first type of development you can take your WSDL on over here where you can quickly turn it into a downloadable PHP SOAP client that supports code completion.

DCPHP Slides

Published on: June 02, 2008   

Thanks for all who showed up to my talk at the DC PHP Conference on "Fed Up of Framework Hype?". The slides are below and I'm sure some will ask about MVCnPHP which can be downloaded here. I know MVCnPHP isn't quite documented as much as I'd like...please ask questions OR wait as I will likely have a blog post about how to get started with it.

The Secret to A Decade of Love

Published on: May 30, 2008   

So yesterday I talked a bit about how my love affair with Kate started. Today I'm going to give you all a secret as to why it still works. What is it? We argue well. Sound odd? Maybe but the truth is when the ball is rolling and life is good everything is just a bit sweeter. The true test of any marriage is how you endure those hard times and, trust me, we've had our fair share of those. I'll admit, most of it is me being me. Guys aren't emotional creatures by default. Yes, some exceptions exist out there but for me I'm less emotional and more spiritual. I don't dwell too much on my own feelings because, thanks to Kate and the kids, I'm a happy guy pretty much all the time. The downside of being happy-go-lucky is that you tend to forget that not everybody is like you and I've learned that a woman needs some emotional stroking from time-to-time. I can boil nearly all our best arguments down to me not acknowledging her emotional needs. That and the fact that one of Kate's greatest attributes is she don't take no shit from me. None. Zero. Zilch.

About Tony

Photo of Tony

Tony runs Apteno, L.C. a software shop specializing in open source solutions based on the Aptitude Application Framework. He's also nuts about the outdoors! Learn more ...

Topics

Noteable Blogs