Home   |   Products   |   Order   |   Support   |   ? !1 UK Web Hosting
 

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

NOTE: The latest version of PHP is PHP4.

Installation
To install the PHP3 CGI, connect to your Virtual Server via Telnet or SSH and do the following.

  1. Install the PHP3 CGI by doing the following, according to your Virtual Server O/S:

    • FreeBSD PHP 3.0.18
      Run the following command, substituting a version of PHP3 for PHP3_VERSION:

      % vinstall PHP3_VERSION
      

      These versions of PHP3 are available:

      php     php-mysql     php-pgsql     php-msql
      

    • Solaris
      PHP3 is unavailable. Try PHP4.

    • BSD/OS Upgrade! PHP 3.0.12
      Run the following command, substituting a version of PHP3 for PHP3_VERSION:

      % cd
      % tar xvf /usr/local/contrib/PHP3_VERSION
      

      These versions of PHP3 are available:

      No database support
      php-3.0.12-redirect.tar
      php-3.0.12-redirect-imap.tar
      php-3.0.12-redirect-gd.tar
      php-3.0.12-redirect-imap-gd.tar
      
      MySQL database support
      php-3.0.12-redirect-mysql.tar
      php-3.0.12-redirect-mysql-imap.tar
      php-3.0.12-redirect-mysql-gd.tar
      php-3.0.12-redirect-mysql-imap-gd.tar
      
      PostgreSQL database support
      php-3.0.12-redirect-pgsql.tar
      php-3.0.12-redirect-pgsql-imap.tar
      php-3.0.12-redirect-pgsql-gd.tar
      php-3.0.12-redirect-pgsql-imap-gd.tar
      
      mSQL database support
      php-3.0.12-redirect-msql.tar
      php-3.0.12-redirect-msql-imap.tar
      php-3.0.12-redirect-msql-gd.tar
      php-3.0.12-redirect-msql-imap-gd.tar
      

      NOTE: PHP no longer creates GIF images via lib-gd. Due to patent restrictions on the GIF compression algorithm we can no longer support it. The PNG Image Format has support for alpha channels, gamma correction, has better compression than GIF compression and supports 48-bit color depth (versus 8-bit color GIF images), and is now widely supported by nearly all modern web browsers.

    • Huh?
      If you don't know the Virtual Server O/S, try the following:

  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. Then, Restart Your Web Server.

    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 CGI executable.

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

  3. To test your PHP installation, try creating the following ~/www/htdocs/test.php3 document and viewing it in your web browser.

    <HTML>
    <BODY>
    <?php
    phpinfo();
    ?>
    </BODY>
    </HTML>
    

    The phpinfo() function reports the version number, as well as the features that are compiled into PHP.


Site Map  |  Contact Us!
Copyright © 1998-2001 Bright Builders, Inc. All rights reserved.
Last Modified: Wed Mar 28 21:42:15 2001 GMT
Page Built: Mon Jul 2 19:55:47 2001 GMT

   
A L S O  S E E
· Virtual Server Help