Page 1 of 1

installing php4 and php5 simultaneosly

Posted: Fri Sep 23, 2005 10:07 pm
by mcastles
I have been trying different methods to run php 4 and 5 simultaneosly but it won't work sadly.

The method I like the best is this one here: =linear#comments]http://blog.rayh.co.uk/index.php?url=archives/13-PHP5-amp;-PHP4-side-by-side.html&serendipity[cview]=linear#comments

php4 runs fine on my server so thats all good.

So far this is what I'm doing to get php5 working.. (or trying to get it working.)

unpack php5 source

run configure...
./configure \
--with-xml \
--with-dom \
--with-mysql=shared\
--with-bzip \
--with-gd \
--with-bzip \
--with-gd \
--with-zlib \
--with-openssl \
--with-gettext --enable-mailparse \
--with-curl \
--with-png \
--with-jpeg-dir=/usr/local/lib/ \
--with-png-dir=/usr/local/ \
--with-freetype-dir=/usr/local/ \
--without-pear \
--without-sqlite \
--enable-shared-pdflib \
--enable-force-cgi-redirect \
--enable-gd-native-ttf \
--enable-versioning \
--enable-mbstring \
--enable-memory-limit \
--enable-safe-mode \
--enable-exif \
--prefix=/usr/local/php5 \
--with-config-file=/etc/php5.ini

make

make install

cp php.ini-recommended /etc/php5.ini

set include_path in /etc/php5.ini...
include_path = "/usr/local/php5/lib/php"

add the following to script alias section of httpd.conf...
ScriptAlias /cgi-php5/ "/usr/local/php5/bin/"
<Directory "/usr/local/php5/bin">
Options +ExecCGI
Allow From All
</Directory>

goto my website httpdocs directory...
mkdir php5
cd php5

create .htaccess with..
Action php5-script /cgi-php5/php
AddHandler php5-script .php
Options +ExecCGI

create index.php with..
<?php
phpinfo();
?>

restart apache...
apachectl graceful

so far.. it all compiles happily and seems to be fine. When I try and navigate to the php5 folder I get an internal server error. The message says to check the server error log which I can't find.

Has anyone got any suggestions on what I should do to get it working?

thanks,

Marc