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

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

NOTE: The PHP4 Apache module installation does not include a PHP configuration file (php.ini). Only the CGI installation includes the configuration file.

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

  1. If necessary, Upgrade Your Virtual Server Apache web server.

  2. Install the PHP4 Apache modules. Follow the directions that correspond to your Virtual Server O/S.

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

    LoadModule  php4_module  modules/FILE-NAME
    

    These PHP4 modules are available:

    No database support
    mod_php4-4.0.4-module.so
    mod_php4-4.0.4-module-ftp-imap-freetype-gd.so
    mod_php4-4.0.4-module-imap.so
    mod_php4-4.0.4-module-mcrypt-freetype-gd.so
    mod_php4-4.0.4-module-mcrypt-ftp-imap-zlib-freetype-gd-dom.so
    mod_php4-4.0.4-module-mcrypt-ftp-imap.so
    
    mSQL database support
    mod_php4-4.0.4-module-msql-ftp-imap-freetype-gd.so
    mod_php4-4.0.4-module-msql-imap.so
    mod_php4-4.0.4-module-msql-mcrypt-freetype-gd.so
    mod_php4-4.0.4-module-msql-mcrypt-ftp-imap.so
    mod_php4-4.0.4-module-msql-mcrypt-ftp-zlib-imap-freetype-gd-dom.so
    mod_php4-4.0.4-module-msql.so
    
    MySQL database support
    mod_php4-4.0.4-module-mysql-ftp-imap-freetype-gd.so
    mod_php4-4.0.4-module-mysql-imap.so
    mod_php4-4.0.4-module-mysql-mcrypt-freetype-gd.so
    mod_php4-4.0.4-module-mysql-mcrypt-ftp-imap.so
    mod_php4-4.0.4-module-mysql-mcrypt-ftp-zlib-imap-freetype-gd-dom.so
    mod_php4-4.0.4-module-mysql.so
    
    PostgreSQL database support
    mod_php4-4.0.4-module-pgsql-ftp-imap-freetype-gd.so
    mod_php4-4.0.4-module-pgsql-imap.so
    mod_php4-4.0.4-module-pgsql-mcrypt-freetype-gd.so
    mod_php4-4.0.4-module-pgsql-mcrypt-ftp-imap.so
    mod_php4-4.0.4-module-pgsql-mcrypt-ftp-zlib-imap-freetype-gd-dom.so
    mod_php4-4.0.4-module-pgsql.so
    

    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.

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

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

      DirectoryIndex index.php index.php4 index.php3 index.cgi index.html index.htm
      

    2. Add the following lines so that all files with .php, .php3, .php4, and .phtml extensions will be redirected to the PHP4 Apache module.

      AddType application/x-httpd-php .php .php3 .php4 .phtml
      AddType application/x-httpd-php-source .phps
      

  5. To test your PHP installation, try creating the following ~/www/htdocs/test.php4 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:40 2001 GMT
Page Built: Mon Jul 2 19:57:46 2001 GMT

   
A L S O  S E E
· Virtual Server Help