I’ve been working on an interesting project lately that I hope to share with everyone soon. I keep running into the oddest of problems trying to get things going. It’s almost as if just getting the whole thing started is the biggest challenge. After that… it’s going to be a lot easier!

I develop on a MacBook Pro. I’ve had this computer since junior year of college when my iBook died right as I had finished page 18 of a 20 page paper on using Bayesian supported neural networks to predict the NCAA tournament and beat my mom in the annual family competition (more on that in March). I therefore use MacPorts to maintain packages on my system. I just don’t think compiling by source, keeping up with all of the packages I need, version matching all sorts of dependencies is a good use of my time.

This new project is the product of a lot of thinking and learning. One big piece of learning on my end involves understanding the value of using frameworks to do a lot of the grunt work that comes with web applications. I’m using CakePHP for this project. Turns out that CakePHP 1.2 and less is not compatible with PHP 5.3. Okay. That’s easy to fix. I’ve moved on to CakePHP 1.3, and the next major release of CakePHP will be API compatible with 1.3 per this blog post.

Next step is getting the database connection working. This drove me crazy. So it turns out that PHP 5.3 comes with MySQL Native Driver. I thought this meant there was going to be a problem with CakePHP as a result. Turns out that wasn’t the case. I was getting all sorts of errors about the extensions not being supported for basic functions like mysql_connect. It just didn’t make any sense. I tried making sure that the sockets were correctly defined in the php.ini files. I tried re-compiling PHP.

The solution. Before I divulge the solution, I think it’s fair to say that the source of all knowledge when it comes to PHP comes from either the phpinfo() function or from doing basic command line actions with PHP. It really gives you a good idea of the health of the PHP universe. The solution turned out to be that the extensions weren’t being loaded because the extension directory in the php.ini file was ./ where it needed to be /opt/local/lib/php/extensions/no-debug-non-zts-20090626 because that’s where the extensions seem to be installed when built by MacPorts.

Now that things are finally setup, it’s on to building out the project. More on that by the first of March!