3 Comments

  1. SeanJA June 18, 2008 @ 1:56 pm

    Took you long enough… if you were that worried about php5 breaking your site you could have just installed Xampp from Apache Friends or the MAMPStack from BitNami like I do.

  2. SeanJA June 19, 2008 @ 3:31 pm

    By site I mean computer…

  3. Gavin Blair June 23, 2008 @ 10:01 am

    I could do that, but I really like how the OS handles Apache intrinsically. My main fear is that something like one of those stacks will conflict somehow with the pre-installed server. Or, somehow I won’t know which server is actually being used.

Upgraded to PHP5

Uncategorized

I’ve finally done it. Stefan Priebsch did a talk that I caught the last part of, 50 Reasons You Should Be Using PHP5 (the last few being, “PHP6 will be really neat” and “PHP5 is fun to do”). Not having seen the entire talk I still felt justified in leaving my Macbook’s default PHP4 installation in. When I mentioned this to some attendees of php|tek, their jaws dropped to the floor. Scandal!

The main reason that I didn’t want to try to install PHP5 was that I’m on a Mac. Generally there are two ways to install something on a mac. First, you can go grab the .DMG file and run the pre-made installation file. This usually works, but sometimes it can crash and no PHP will work for you ever. The second way is to grab the source code and compile it yourself. It goes without saying that that takes forever, especially if you have to keep trying different compile flags to see what works best, and what allows the compile to finish.

As an entrepreneur with a startup on his plate, I really need PHP to work for me. I couldn’t risk breaking PHP for my machine.

One day, however, I just got tired of typing <?php echo $variable; ?> and got a little jealous of PHP5’s <?=$variable?>. It sounds cheap, but this is the main reason that I took the plunge. And yes, I compiled it from source. It worked, but it required me to upgrade my MySQL installation too. The new MySQL installation required me to re-install PHP5. MySQL also decided to let me keep all of my databases, as long as I don’t reboot my machine. Of course, I found this out the hard way, waking up the next morning, turning on my Macbook and realizing that I don’t have any databases!

All is well now, I found an old dump of my most important database, and I just love echoing out variables with shorttags. And now, here is my 2 Reasons You Should Be Using PHP5:

  1. Short tags!
  2. People will stop bugging you about it.
Oh, and in case you have a Macbook with Tiger on it (Leopard already comes with PHP5 installed), here is the tutorial I used.
Cheers

Gavin Blair @ June 9, 2008

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>