We-Host.com Main Web Site
Web Development
Support

Installing Options/Software
php3 Ver. 3.0.12

PHP
PHP is a popular, freely available web applications development tool. The newest version, called PHP3, includes an HTML-embedded scripting language and a server-side preprocessor that interprets the HTML- embedded code in order to create dynamically generated web pages. PHP3 includes support for various databases, including mSQL, MySQL, and PostgreSQL. Thus, PHP is commonly used for the development of database enabled web sites.

Like other preprocessed, html-embedded scripting languages, PHP has many of the more useful features of Perl but is designed for HTML development in mind. It eliminates the need for numerous small Perl CGI programs by allowing you to place simple scripts directly in your HTML files. This speeds up the overall performance of your web pages since the overhead of forking Perl several times has been eliminated. It also makes it easier to manage large web sites by placing all components of a web page in a single html file. Similar tools commercially available include Miva, Aestiva HTML/OS, and Meta-HTML PRO.

Installing PHP3
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 Module. It can also be installed as a CGI to which PHP3 files are redirected by the web server.

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

  1. Add one of the following lines, that match your Virtual Server O/S, to the top of your web server configuration file (~/www/conf/httpd.conf) to dynamically load the PHP3 module with MySQL and IMAP support:
    FreeBSD
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-mysql-imap-freetype-gd.so
    
    BSD/OS
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-mysql-imap.so
    
    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
    

    These PHP3 modules are also available.

    FreeBSD
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-imap-freetype-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-msql-imap-freetype-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-pgsql-imap-freetype-gd.so
    
    BSD/OS
    LoadModule  php3_module  modules/mod_php3-3.0.12-module.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-imap-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-imap.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-msql-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-msql-imap-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-msql-imap.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-msql.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-mysql-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-mysql-imap-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-mysql.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-pgsql-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-pgsql-imap-gd.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-pgsql-imap.so
    LoadModule  php3_module  modules/mod_php3-3.0.12-module-pgsql.so
    
  2. Add the following line to the ~/www/conf/httpd.conf file so that all files with .php3 extensions will be redirected to the PHP3 CGI executable:
    AddType application/x-httpd-php3 .php3
    NOTE: If your Virtual Server was configured before Dec 8, 1998 you will need to make this addition in the ~/www/conf/srm.conf file instead, and then restart your web server:
    % restart_apache
    

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

  1. Change to your home directory:
    % cd
  2. Install the PHP3 software. Use one of the commands below, depending upon your Virtual Server O/S.
    FreeBSD
    % vinstall php
    
    BSD/OS
    % tar xvf /usr/local/contrib/php-3.0.12-redirect.tar
    
    NOTE: These PHP3 CGIs are also available.
    FreeBSD
    % vinstall php-msql
    % vinstall php-mysql
    % vinstall php-pgsql
    
    BSD/OS
    % tar xvf /usr/local/contrib/php-3.0.12-redirect.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
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-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
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-msql.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
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-mysql.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
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql-imap.tar
    % tar xvf /usr/local/contrib/php-3.0.12-redirect-pgsql.tar
    
  3. Add the following lines to the ~/www/conf/httpd.conf file so that all files with .php3 extensions will be redirected to the PHP3 CGI executable:
    AddType  application/x-httpd-php3  .php3
    Action   application/x-httpd-php3  /cgi-bin/php
    
    NOTE: If your Virtual Server was configured before Dec 8, 1998 you will need to make these additions in the ~/www/conf/srm.conf file instead, and then restart your web server:
    % restart_apache
    

Contents Copyright 1997-2003  We-Host Web Hosting. See our copyright page for additional copyright and disclaimer information.

Last Updated: 11 June, 2000  · Email support web site errors to webmaster@we-host.com

We-Host Web Hosting