LAMP on a Mac
Recently I’ve been looking at getting back into doing some PHP development outside of work, some R&D and general playing about with new technologies. Something which isn’t possible at where I work, innovation is oddly frown upon, something I blog about later. Anyway back to my home set up, I’ve got a MacBook Air which is main laptop/computer. I do have a office or sorts but I’ve started to be sat in front the TV more and more,mainly because of my HiFi. My office has kind of turned into a no-mans land at the moment. Anyways I moving off topic here… ahem!
What I used to use was a VM copy of my server environment which was preconfigured to be the same as my production environment, this allows me to test my applications before I deploy them in a like-for-like senario. The downside of this on a MBA is the heat is generated, heat from the computations required to run a OS in another OS, not a great solution. If I owned a powerful desktop this would be acceptable but not on portable device which lives on my lap.
Next I tried an app called MAMP, an all-in-one out-of-box solution which includes Apache, MySQL and PHP. This is all well and good when you just use these components, but I tend to use nginx and SQLite now anyways, as they use less resources on my VPS which allows my server to focus more on the meaty part of any PHP application, the PHP code itself. At the moment I’m quite interested in the next release of PHP, PHP 5.4 beta 2 which includes it’s traits support (if you don’t know what that is go and google it). Using this out-of-box solution is quick but doesn’t include the PHP betas, I’ve tried compiling it against the MAMP libraries but it’s impossible to compile as the headers aren’t included in the MAMP application.
Final and the best solution I have found so far is to kick it old skool, and just compile it all from source using MacPorts. Apart from PHP 5.4 which you have to configure yourself and build, something I haven’t managed yet – only because I haven’t tried. Hopefully sometime this week I will get able to get a custom port up of PHP 5.4 beta 2 running. If I do I will do post the results of how to do this here first.
November 8th, 2011 - 01:17
Somewhere within the paragraphs you actually managed to make me a believer but only for a short while.