Yup I just upgraded from PHP4.3.8 to PHP5.0.1 on the Gentoo VPS hosting this weblog. It went rather smoothly, except for an oversight where I actually forgot to compile PHP with session support (and had to re-compile it). Just unmerge the existing PHP and mod_php packages, and emerge them again from ebuilds.
emerge -pv /usr/portage/dev-php/php/php-5.0.1.ebuild
USE="curl session mysql postgres zlib ldap" emerge -v /usr/portage/dev-php/php/php-5.0.1.ebuild
emerge -pv /usr/portage/dev-php/mod_php/mod_php-5.0.1.ebuild
USE="curl session mysql postgres zlib ldap" emerge -v /usr/portage/dev-php/mod_php/mod_php-5.0.1.ebuild
No configuration needed beyond commenting out the LoadModule directive (for PHP4) in the Apache configuration file and changing the Apache startup options (in /etc/conf.d/apache2):
APACHE2_OPTS="-D SSL -D PHP5"
A restart of Apache2 is all that's left.
I'm not sure if I left any essential stuff out in the USE flags (which roughly translates into configure options) I used so if anyone would be so kind to skim through my phpinfo() and let me know, I'd be grateful and will be sure to return the favor. Some of the USE flags/configure options are pretty self-explanatory but I have no idea what the rest really do. What does excluding the truetype flag mean? Does it mean I don't get TrueType font support when dynamically generating images (with gd)? What about the pcre flag? If I don't compile with pcre, does that mean no preg_* functions for me? Point me to an explanatory page please (I have been looking).