Installing PHP5 and its dependencies on a Godaddy virtual dedicated server
3 December 2006
I have recently developed the first version of a book price comparison
website, booksmarts.co.uk. It’s fairly
simple, but it does depend on the simple XML parser built into PHP5.
I wasn’t sure what version of PHP was already running on my server, so I was
hoping that I would just be able to drop the PHP files in and they would work
straight away. As is often the case, things turned out to be more complicated
than they first appeared to be. This blog entry explains what I did to upgrade
PHP and its dependencies. It is primarily a record for myself, but might prove
to be useful to other people trying to achieve something similar.
(Note that what follows is the order that the steps actually need to be
carried out in, not the ‘try it, find unexpected dependency, install that
first’ route I actually took!)
binutils
This step might not be necessary after all, but I did do it and it shouldn’t hurt.
Get the latest version of binutils, needed to build the C++ compiler.
gcc/C++
flex
apache
PHP5 requires apache > 0.0.44, so build latest 2.0.* one [.so extensions
aren’t compatible with later ones and I don’t want to rebuild these [in
retrospect, I had to do this anyway, so might have been better off with a more
recent apache]].
libxml
PHP (finally!)
edit /usr/local/apache2/conf/httpd.conf to use PHP5 instead of PHP4.
Mail, etc. for PHP (i.e. PEAR)
mod_perl
Other sites on the same server use a small amount of perl, so need to update
mod_perl.