Support
 
 

The mod_php3 Apache Module
There are several different ways to install PHP3 on a Virtual Private Server. The best way is to install the mod_php3 Apache Module. Another less desirable method is to install The PHP3 CGI to which PHP3 files are redirected by your web server.

NOTE: The latest version of PHP is PHP4.

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

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.

  1. Install the PHP3 Apache module. Follow the directions that correspond to your Virtual Private Server O/S.

    • FreeBSD [PHP 3.0.18]
      Substitute the file name of the Apache module you want to install for FILE-NAME below.

      % cd /usr/local/apache/1.3/modules
      % ln FILE-NAME ~/www/modules/FILE-NAME
              

      These PHP3 modules are available.

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

    • Solaris
      PHP3 is unavailable. Try PHP4.

    • BSD/OS Upgrade! [PHP 3.0.12]
      Substitute the file name of the Apache module you want to install for FILE-NAME below.

      % cd /usr/local/apache/modules/1.2.6
      % ln FILE-NAME ~/www/modules/FILE-NAME
              

      These PHP3 modules are available.

      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
              

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


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

    LoadModule php3_module modules/FILE-NAME
  3. Make the following additions and modifications to your web server configuration file (~/www/conf/httpd.conf).

    NOTE: If your Virtual Private 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 Apache module.

      AddType application/x-httpd-php3 .php3
      AddType application/x-httpd-php3 .phtml
  4. 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