debuggable

 
Contact Us
 

Installing PHP5.3 via MacPorts

Posted on 17/9/08 by Felix Geisendörfer

Hey folks,

this is post #28 of my 30 day challenge.

I originally wanted to continue my post on the linguistics of programming
today, but I was simply unwilling to publish what I have so far as it will require much more research to be of any significance.

So instead I'll share an easy way to play around with PHP5.3 if you're on a Mac. First of all install MacPorts (don't forget to install XCode before). Then run:

sudo port install php5-devel +apache2 +mysql5 +pear

To verify it worked run:

php --version

You should see:

PHP 5.3.0alpha1 (cli) (built: Sep 16 2008 16:03:17)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies

After that, follow the instructions that from this general PHP5 via macports tutorial to get your new PHP5.3 configured with an Apache2 server.

Have fun with the new PHP : ).

-- Felix Geisendörfer aka the_undefined

 

You can skip to the end and add a comment.

Rob Richmond said on Sep 17, 2008:

Do you also use MAMP? If so, how does this installation work with MAMP?

Felix Geisendörfer said on Sep 17, 2008:

Rob Richmond: Nope, I don't use MAMP anymore. I used to use it but I'm happier with my new setup : ).

Lucas Ferreira said on Sep 17, 2008:

And MySQL?

Can install that by MacPorts too?

[]'s

Felix Geisendörfer said on Sep 18, 2008:

Lucas Ferreira: That's what the +mysql5 is for ; ).

Anthony  said on Sep 19, 2008:

I got errors on the "make all" for mysql5 when starting from scratch. I found I had to install things in this order:

sudo port install mysql5 +server
sudo port install apache2

sudo port install php5 +apache2 +mysql5 +pear

Christian Tietze said on Sep 20, 2008:

Hmm I always wonder what happens with Mac OS X.5's own "Web-Sharing" (Apache, PHP, MySQL etc.) and whether I could _update Mac's standard setup_ instead of instaling the same software anew (with higher version count, of course).

There's definetly no interference as far as I could tell. I was on "MAMP" after I bought the Mac, meaning I installed everything necessary myself. Removing stuff worked just fine and Mac's default setup still works.

This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.