Home Contact Us Search

[ Order a Server ] [ Server Support ]


[ Getting Started ] [ Server Help ] [ Add on Help ] [ Solution ] [ Trouble Shooting ]

PLEASE NOTE, THIS IS VERY OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS

Installing PHP3

There are two different ways to install PHP on a Virtual Server. The best way is to install it as a Dynamic Module. It can also be installed as a CGI to which PHP3 files are redirected by your Virtual Server web server.

Which Version of PHP Should You Choose?

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. You should choose the build that best suits your needs but at the same time does not add unnecessary overhead to your web server.

For example, if you plan on making use of 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.

mod_php3-3.0.16-module-msql-mcrypt-ftp-imap.so

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.

mod_php3-3.0.16-module-pgsql.so

By selecting the PHP build carefully, you will maximize your virtual server's memory use as well as improve the performance of your Apache Web Server.

Dynamic Module Installation

Connect to your Virtual Server via Telnet or SSH and do the following:

  1. If your Virtual Server is running the FreeBSD O/S, then Upgrade Your Virtual Server Apache (if you aren't already running Apache 1.3). If your Virtual Server is running the BSD/OS, then skip to the next step.

    NOTE: If your Virtual Server was ordered after Nov 22, 1999, you are likely running FreeBSD. To find out which O/S your Virtual Server is running, use the uname command:

    % uname
    

    If your Virtual Server is not already running FreeBSD, Upgrade to a New FreeBSD Virtual Server today!

  2. Install the PHP dynamic module on your Virtual Server. Substitute the name of the dynamic module you want to install for MODULE-NAME below.

    FreeBSD PHP 3.0.16
    % cd /usr/local/apache/1.3/modules
    % ln MODULE-NAME ~/www/modules/MODULE-NAME
    

    BSD/OS PHP 3.0.12
    % cd /usr/local/apache/modules/1.2.6
    % ln MODULE-NAME ~/www/modules/MODULE-NAME
    

    Currently, these PHP dynamic modules are available.

    FreeBSD PHP 3.0.16
    No database support
    mod_php3-3.0.16-module.so
    mod_php3-3.0.16-module-imap.so
    mod_php3-3.0.16-module-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-mcrypt-freetype-gd.so
    mod_php3-3.0.16-module-mcrypt-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-mcrypt-ftp-imap.so
    
    mSQL database support
    mod_php3-3.0.16-module-msql.so
    mod_php3-3.0.16-module-msql-imap.so
    mod_php3-3.0.16-module-msql-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-msql-mcrypt-freetype-.so
    mod_php3-3.0.16-module-msql-mcrypt-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-msql-mcrypt-ftp-imap.so
    
    MySQL database support
    mod_php3-3.0.16-module-mysql.so
    mod_php3-3.0.16-module-mysql-imap.so
    mod_php3-3.0.16-module-mysql-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-mysql-mcrypt-freetype-gd.so
    mod_php3-3.0.16-module-mysql-mcrypt-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-mysql-mcrypt-ftp-imap.so
    
    PostgreSQL database support
    mod_php3-3.0.16-module-pgsql.so
    mod_php3-3.0.16-module-pgsql-imap.so
    mod_php3-3.0.16-module-pgsql-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-pgsql-mcrypt-freetype-gd.so
    mod_php3-3.0.16-module-pgsql-mcrypt-ftp-imap-freetype-gd.so
    mod_php3-3.0.16-module-pgsql-mcrypt-ftp-imap.so
    

    BSD/OS PHP 3.0.12
    No database support
    mod_php3-3.0.12-module.so
    mod_php3-3.0.12-module-imap.so
    mod_php3-3.0.12-module-gd.so
    mod_php3-3.0.12-module-imap-gd.so
    
    mSQL database support
    mod_php3-3.0.12-module-msql-gd.so
    mod_php3-3.0.12-module-msql-imap-gd.so
    mod_php3-3.0.12-module-msql-imap.so
    mod_php3-3.0.12-module-msql.so
    
    MySQL database support
    mod_php3-3.0.12-module-mysql.so
    mod_php3-3.0.12-module-mysql-imap.so
    mod_php3-3.0.12-module-mysql-gd.so
    mod_php3-3.0.12-module-mysql-imap-gd.so
    
    PostgreSQL database support
    mod_php3-3.0.12-module-pgsql.so
    mod_php3-3.0.12-module-pgsql-imap.so
    mod_php3-3.0.12-module-pgsql-gd.so
    mod_php3-3.0.12-module-pgsql-imap-gd.so
    

  3. Add the following line to the top of your Virtual Server web server configuration file (~/www/conf/httpd.conf) to dynamically load the PHP3 dynamic module. Substitute the name of the dynamic module you want to install for MODULE-NAME.

    LoadModule  php3_module  modules/MODULE-NAME
    

  4. Make the following additions and modifications to your Virtual Server web server configuration file (~/www/conf/httpd.conf).

    NOTE: If your Virtual Server was configured before Dec 8, 1998 you will need to make the following additions and modifications in the ~/www/conf/srm.conf file instead, and then restart your web server:

    % restart_apache
    

    1. Modify the DirectoryIndex line so that index.php3 files will be included as directory indices.

      DirectoryIndex index.php3 index.cgi index.html index.htm
      

    2. Add the following lines so that all files with .php3 and .phtml extensions will be redirected to the PHP3 dynamic module.

      AddType application/x-httpd-php3 .php3
      AddType application/x-httpd-php3 .phtml
      



CGI Redirect Installation

Connect to your Virtual Server via Telnet or SSH and do the following.

  1. Install the PHP3 software. Use the commands below, depending upon your Virtual Server O/S to install the basic build of PHP.

    FreeBSD PHP 3.0.16
    % vinstall php
    

    BSD/OS PHP 3.0.12
    % cd
    % tar xvf /usr/local/contrib/php-3.0.12-redirect.tar
    

    We have made a number of PHP CGI builds available. To install a build with features that you want, use one of the following commands, instead of those above.

    FreeBSD PHP 3.0.16
    % vinstall php
    % vinstall php-msql
    % vinstall php-mysql
    % vinstall php-pgsql
    

    BSD/OS PHP 3.0.12
    No database support
    % tar xvf /usr/local/contrib/php-3.0.12-redirect.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-gd.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-imap-gd.tar
    
    mSQL database support
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql-gd.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql-imap-gd.tar
    
    MySQL database support
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql-gd.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql-imap-gd.tar
    
    PostgreSQL database support
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql-gd.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql-imap-gd.tar
    

  2. Make the following additions and modifications to your Virtual Server web server configuration file (~/www/conf/httpd.conf).

    NOTE: If your Virtual Server was configured before Dec 8, 1998 you will need to make the following additions and modifications in the ~/www/conf/srm.conf file instead, and then restart your web server:

    % restart_apache
    

    1. Modify the DirectoryIndex line so that index.php3 files will be included as directory indices.

      DirectoryIndex index.php3 index.cgi index.html index.htm
      

    2. Add the following lines so that all files with .php3 and .phtml extensions will be redirected to the PHP3 PHP3 CGI executable.

      AddType application/x-httpd-php3 .php3
      AddType application/x-httpd-php3 .phtml
      Action  application/x-httpd-php3 /cgi-bin/php
      


PLEASE NOTE, THIS IS OLD ARCHIVE INFORMATION AND MAY NOT FUNCTION ON NEW SERVERS