Painlessly run version 5.2.x and 5.3.x on the same apache port simultaneously.
Several persons have indicated that they could not get this working per my instructions below. For a more thorough explanation, see Chris Breidert’ s follow-up blog post. One of these days, when I get more time, I’ll go through a vanilla installation and add any additional instructions, etc.
I’d just upgraded to Ubuntu 10.10 on my PC. However, the default PHP package was version 5.3.x and I needed 5.2.x. Some projects needed the newest version, others would be crippled by it. While looking for a way to have two versions of PHP running simultaneously on Ubuntu 10.10, I struck success.
In this post, I’ll explain step-by-step how you too can build a development platform where you can work on PHP 5.2.x and 5.3.x projects simultaneously–without ever having to restart Apache. Read the rest of this entry »
CodeIgniter Form Validation
Continually using the CodeIgniter MVC Framework has allowed me to experience many of it’s numerous “pros.” However, some times, I also hit a snag with one or more of it’s infrequent ”cons.” Truthfully, it’s put together overwhelmingly well (and much credit is due to the Ellis Labs crew for helping to make a PHP developer’s life a little easier.) Unfortunately, some libraries just do not work the way one (okay, me!) would expect them to work. Perhaps they are just a bit too inflexible for me. For example, I’ve never been a huge fan of CodeIgniter’s Form Validation library, and now I have yet another reason to scorn it somewhat. Admittedly, I’m probably being a bit too severe on this one. However, I feel annoyed in situations where lack of proper documentation costs me precious time (I say this in light of CodeIgniter’s, otherwise, excellent documentation.) Luckily, my perceived notion of how CodeIgniter’s Form Validation Library should work can be accomplished, once again, with the kind of simple modification that keeps me coming back to CodeIgniter time and again. Read the rest of this entry »
Ever wonder why you can’t use query strings with CodeIgniter? This post will explain to some degree, but more importantly, show you how to parse query strings and how to get the GET back in CodeIgniter!
I’ve been using CodeIgniter for a couple years now. It’s small, it’s simple, it’s powerful. Admittedly, it’s not perfect (what framework is?) but it’s a wonderful way to slap together a website using MVC design principles and PHP. I do have one big complaint, however.
Read the rest of this entry »
So, you finished that CodeIgniter Website last month. It was a tedious project and you’re glad it’s over! But wait! Now, your client informs you that you’re missing all the tracking code! The client also mentions he wants to use the popular, free Analytics tools from Google. This is gonna require inserting some javascript into all of your Web pages. Not a problem if you used a global footer in your views. A potentially huge pain otherwise. Either way, if you’re looking for a very simple way to globally implement Analytics code in your application, CodeIgniter hooks can make your life much easier. I’m going to show you how to take advantage of the ‘display_override’ hook point in CodeIgniter to get the job done fast! Read the rest of this entry »
Posted on : 12-07-2010 | By :
Brett | In :
Mac, PHP
Foreword
Lately, when attempting to install extensions for MAMP, I’ve had a difficult time making my extensions work properly because my Darwin ports settings seem to override. Fortunately, I recently found a blog post with instructions that worked. There are a few steps that are different, however, for getting this to work with version 1.9. Therefore, I decided to post the original instructions with those modifications here. Read the rest of this entry »
Currently, I am working on a minimal MVC framework for a somewhat ambitious project. I chose to host this website using the latest and greatest: PHP-FPM on nginx running PHP 5.3. After realizing that I needed a form validation library, I came up with one that is fairly easy to use and somewhat extensible. This is the first time I have been able to use Closures in PHP code so maybe I am just a little bit geeky-giddy.
Read the rest of this entry »
After nearly two months of using OS X, I think I have finally found my groove when it comes to doing my job. That is, writing code for websites, mainly in PHP.
For many years prior to using a Mac for PHP development, I had been using Windows or Linux and Zend Studio 5.x. When I was looking several months back for the Mac version download for my Zend Studio license, I was presented, instead, with a free upgrade to version 6. Wow, that was nice Zend! Unfortunately, the version I paid for (the “perpetual” license) was no longer there to download.
UPDATE: As of my last login to Zend, the 5.5.1 download was available. I installed and everything worked well. Still using Netbeans but appreciated all the same.
But hey! I got the brand-new version. That’s great right? Wrong! Zend decided to drink the Eclipse Kool Aid and completely changed an IDE that I had grown accustomed to (I guess it’s only fair to point out that Zend Studio 5.x was so old at this point that it was getting increasingly more difficult to install on more modern operating systems and newer java platforms.) In spite of the seemingly “over-bloat” of Zend Studio 6.0, I decided to give it a try. I must say that everything just felt wrong. Now I’m sure there are many PHP developers out there that have been using Eclipse for years and can’t live without it, but I just couldn’t seem to make it work my voodoo. I didn’t have the patience to get my Eclipse PHD, so I went looking elsewhere. That led me to a surprising alternative: Netbeans. Although very similar to Eclipse, an IDE with modules/plug-ins for multiple computer language support, Netbeans (entirely free) impressed me right on the spot. I know Zend Studio has all the same features more or less, but the way Netbeans is put together just seemed more natural to me (things I wanted to do actually worked.) Let it suffice to say that I have been using Netbeans since then and I haven’t looked back!
In this post, we will discover how to go about debugging a specific page in your website through setting up debugging in your MAMP stack, the free Netbeans IDE and your Firefox browser.
Read the rest of this entry »
Geeks and Gladiators
Two-thousand years ago, it was conquered soldiers and Christians. Since recently reading some blogs, and after hanging out in a few chat rooms with the “techno-elite”, I’m thinking the newest group to be “thrown to the lions” are PHP developers!
It’s convincingly apparent if you search the “blogosphere” that many “techies” think that the phrase PHP programmer is an oxymoron. If you use PHP does that really earn you the despised title of newbie?
Read the rest of this entry »
After 4 years I still haven’t done anything but deploy an open source Rails app. I would still like to immerse myself in a big project that forces me to learn Ruby and Rails (Right after Python and DJango. Although lately I’m thinking perhaps Ruby is a better language for me than Python.) It’s also pretty obvious I knew nothing about Rails back in 2006.
Being the PHP aficionado I am, I tend sometimes to stay in my little PHP bubble (ASP made me distrust & dispise the Web scripting world.) Every now and then I come out and see something that is a breath of fresh air.
Ruby on Rails (or ROR) is yet another framework for Web applications. It’s not kludgy like Java and .NET though. What I mean (or meant) is that the learning curve is moderate as opposed to being quite daunting to plunge into like other frameworks for Web.
Ruby is a relatively new language on the block, but is gaining popularity in the development world for its simple and clean syntax and portability.
Ruby on Rails is easy to setup on windows so you can play with it yourself before committing to turn it up on your live site. O’Reilly OnLamp.com has an excellent tutorial to get you up and running with a web editable database in minutes!
I certainly plan on giving it a whirl within the next few months.
12