Hi,
You can use php4 installed as an apache module and php5 installed as cgi (or vice-versa). But you need to recompile and reconfigure. It requires some Linux skills and time.
The biggest difference between php4 and php5 is the register_globals value set to Off in php5. We had to let it On because a lot of websites (we made) use register_globals (which is old-insecure-amateur coding style).
If you plan to upgrade I recommend you to annouce to your customers early enough.
You can easily set a local register_global value in the htaccess file of every site who needs it.
Also be sure that the mysql API client version of php is compatible with the Mysql server.
I advise you to install and upgrade all your stuff on a test server before doing this "live and direct" on the production server.
Anyway, I'm using dexter's repos. Installed easily and no big trouble.
Here's my complete howto (some of it is on the previous post).
This howto worked with Debian 3.1 Sarge on my servers.
Of course. I'm not responsible of your actions, if your server crashed, if your customers want to sue you or if you've been fired. Please be aware of what you are typing. Fear yourself when you are logged as root.
1) Add This to your sources.list
Code:
# PHP5.1 pour Debian sarge
deb [url]http://people.debian.org/~dexter[/url] php5.1 sarge
deb-src [url]http://people.debian.org/~dexter[/url] php5.1 sarge
# pear-package for Debian sarge
deb [url]http://people.debian.org/~dexter[/url] pear-package sarge
deb-src [url]http://people.debian.org/~dexter[/url] pear-package sarge
2) Install php5 and pear
Code:
apt-get install libapache2-mod-php5.1 php5.1-curl php5.1-exif php5.1-ftp php5.1-gd \
php5.1-gettext php5.1-mysql php5.1-sqlite php5.1-session php5.1-imap
apt-get install pear-package
Ad this stage: php4 and php5 are installed on your server. You can disable/enable both of them when you want:
3) Enable php5
Code:
a2dismod php4
a2enmod php5.1
/etc/init.d/apache2 force-reload
4) If things messed up, enable php4
Code:
a2dismod php5.1
a2enmod php4
/etc/init.d/apache2 force-reload
good luck and have fun
