well, it's not really concurrent, but I want to be able to switch between php4 and php5 by just running one or two commands. to get started, I need to compile php5 from source. this one is based on my system, archlinux.
# cd /var/abs
# abs
# cd devel/php
# vi PKGBUILD
need to edit this line:-
./configure --with-apxs --prefix=/usr/php5 --sysconfdir=/etc/php5
--with-config-file-scan-dir=/etc/php5
--with-pear=/usr/share/php5/pear
make INSTALL_ROOT=$startdir/pkg EXTENSION_DIR=/usr/lib/php5 install
cp ../php.ini $startdir/pkg/etc/php5
the package name also need to be changed, since we already have package php installed.
pkgname=php5
and all I need to do is run:-
# makepkg
# pacman -A pkgname
we also need to define new apache configuration file.
# cd /etc/httpd/conf
# cp httpd.conf httpd-php5.conf
# vi httpd-php5.conf
edit these line:-
PidFile /var/run/apache-php5.pid
ScoreBoardFile /var/run/apache-php5.scoreboard
LoadModule php5_module /usr/lib/apache/libphp5.so
our php5 configuration file and module are located in:-
/etc/php5
/usr/lib/php5
test run php with:-
# httpd -f /etc/httpd/conf/httpd-php5.conf
if no error displayed, we are done. ref