There are two different ways to install PHP3 v3.0.12 on a Virtual Server.
The best way is to install it as a Dynamic
Which Version of PHP3 do I install?
Within each version of PHP, there are several "builds" to choose from. A
build consists of PHP's core features--which are found in every build--and
some optional additional features, such as database support, on-the-fly
image creation, and encryption.
Bottom Line: You should choose the build that best suits your needs
but at the same time does not add unnecessary overhead to your web server.
Example 1: if you plan on using PHP to transfer files between computers,
or to use TWIG to access your email,
you'll want to choose a PHP build that includes ftp, imap, and the database
backend you're using for TWIG in the build name.
Example 2: If you want to use PHP chiefly to access
a PostgreSQL database,
but not build images on the fly, choose a PHP build with pgsql but without
freetype and gd in the build name.
By selecting the PHP build carefully, you will maximize your
virtual server's memory use as well as improve the performance of your Apache
Installation as a Dynamic Module
This involves installing the mod_php
apache dynamic modules. Instructions for this are here.
Installation with CGI Redirect
The other way to install PHP3--as a CGI to which PHP3 files are redirected
by the web server--is shown below.
- Connect to your Virtual Server via Telnet
or SSH and change to your home directory:
- Install the PHP3 software using the command below:
% vinstall php
These PHP3 CGI builds are also available.
% vinstall php-mysql
% vinstall php-pgsql
- Modify the DirectoryIndex
line of your ~/www/conf/httpd.conf
file so that index.php3 files will be included as directory indices.
index.php3 index.cgi index.html index.htm
- Add the following lines to your ~/www/conf/httpd.conf
file so that all files with .php3
and .phtml extensions
will be redirected to the PHP3 CGI executable:
AddType application/x-httpd-php3 .phtml
Action application/x-httpd-php3 /cgi-bin/php