Hi,
installing a php enabled apache parallel to an existing install can sometimes be a hard job but you can do it at all. I can give you a step by step list of how to do that. But you need to change the port the custom apache listens on so you can access the new instance by e.g. http://www.thehost.com:8080/.
With the console command netstat -an you can see which ports are already occupied by services.
You can compile apache so that all files belonging to that instance will be installed to one directory and subdirectories in that directory.
I'll try to do it as simple as possible. It
a)
create a script like info.php to be displayed with your existing installation:
<?PHP
phpinfo();
?>
Near the top of the output you'll see the configuration parameters php has been compiled with. Chances are good that you'll be able to successfully compile php by using the same configure parameters (adjusting the --with-apache=../apache-1.3.12 switch).
b)
download the latest php and apache-1.3.x source packages and unzip them to a directory like /usr/src.
c)
cd to that directory and uncompress the packages with e.g.
tar xvzf apache-1.3.27.tar.gz
tar xvzf php-4.3.1.tar.gz
I assume that this will create the two directories apache_1.3.27 and php-4.3.1
d)
cd to apache_1.3.27 and execute configure, e.g.:
./configure --prefix=/usr/local/apache --with-port=8080
set prefix to the directory where you want and port to a free port.
e)
cd to php-4.3.1 and execute:
./configure --with-apache=../apache_1.3.27
and add all the switches you saw on output of the info script (excluding --with-apache=../apache-1.3.12).
f)
execute make
this might be the hardest part, if errors occur 🙁
Please post them if any occur.
g)
execute make install
h)
cd to apache_1.3.27
./configure --prefix=/usr/local/apache --with-port=8080 --enable-module=most --enable-shared=max --activate-module=src/modules/php4/libphp4.a
i)
make
j)
make install
k)
edit /usr/local/apache/conf/httpd.conf and insert the line
AddType application/x-httpd-php .php .phtml
somewhere below the LoadModule and AddModule sections, e.g. where the tgz type is added.
It might then look like
AddType application/x-tar .tgz
AddType application/x-httpd-php .php .phtml
l)
start apache with
/usr/local/apache/bin/apachectl start
In best case apache starts and you should then be able to access the new instance with
http://www.mysite.com:8080/myscript.php.
The scripts and html pages have to be copied to <installdir>/htdocs, in the above example /usr/local/apache/htdocs.
The most annoying part could be the compilation of php if there are some libraries missing.
You can see what extensions are available by executing
./configure --help in php-4.3.1.
I know it looks a little bit complicated, but it should work.
T.