;

I, perhaps stupidly, decided that I would upgrade from Apache 1.3 to Apache 2.0 the other day. It was not a happy upgrade and took a good couple of days to get most things working again. I hit two big problems both of which were related to PHP. Since I imagine most installations of Apache have PHP installed I decided to list these problems under Apache rather than PHP.

Gotcha One - register_globals

When you upgrade Apache you have to install libapache2-mod-php4 (well you don't have to but I suggest you do). The first gotcha is with register_globals which is set to on in the default php.ini for Apache 1.3 but off in the default php.ini for Apache 2. If your website makes use of $DOCUMENT_ROOT then this little difference will render your site useless until you change it to on. There are good reasons to have register_globals set to off, and you should modify your site to work with it set to off, but the lack of consistency will likely catch you out.

Gotcha Two - Many to Many SAPI Upgrade

The second big gotcha is with the fact that when you install Apache 2 after Apache 1.3 it doesn't automatically update the php.ini files so that the related packages can be used with Apache 2. The result is that database access doesn't work and you get nasty error messages like this:

Fatal error: Call to undefined function: pg_connect() in
/usr/share/phpbb2/site/db/postgres7.php on line 79

The solution to this is to reconfigure the php4-pgsql and php4-mysql packages with:

dpkg-reconfigure php4-pgsql php4-mysql