Day: December 30, 2004

  • Apache2 and PHP5 in Less than 10 Minutes

    This weeks Debian Weekly News featured a link to some unofficial debs of PHP5. I’ve been meaning to tinker with PHP5 for some time now and jumped on the opportunity to do so.

    I took a fresh and minimal Debian Testing install (updated from a tiny stable install) and added the following line to my /etc/apt/sources.list:

    deb http://people.debian.org/~dexter php5 sid

    After an apt-get update I used apt-get install to install the following packages:

    • apache2-mpm-prefork
    • libapache2-mod-php5
    • Many of the standard Apache2 modules
    • Many of the standard PHP5 modules listed here
    • A few suggested and recommended packages.

    I ran the install command with -s a few times to see what would be installed, but zero to working Apache2 + PHP5 took me less than 10 minutes. Of course this is running unofficial stuff on a Testing system (though if you ask nice enough you should be able to pull this off on an otherwise Stable distro, but why would you do that?), so use it at your own risk. I’d suggest that you not try this on a production system. Until we see PHP5 incorporated into the various distros, this might be the quickest way to give it a go.

    I’m excited to tinker with the new OOPness features in PHP5. I’ve also got my eye on a particular MVC framework called Mojavi.

    Update (1/12/2005): As some have noticed it looks like there has been some moving and shaking in this unofficial unstable php5 build. After an apt-get update; apt-get dist-upgrade a few days ago, I lost the ability to use DomDocument. I checked the dists directory and changed my sources.list to reflect sid-old.

    I changed my sources.list back to sid after noticing that there were fresh new (5.0.3-0.3) pakages dated this morning at 4am. The new packages are excellent!

    Let me say again, don’t use this on a production system. But do look around, have some fun, and get a feel for php5. Special thanks to Piotr Roszatycki (dexter) for generating these packages.