SITEMAP HOME
SIGN IN | FAQs | CONTACT
4Domains Web Hosting and Domain Registration Secure Shopping
Account Login   WebMail   Live Chat

Web Hosting

Domain Names

FREE Toolbar

Domain Auction

E-Commerce

Internet Tools

Business Solutions

Web Hosting Packages   Web Hosting Comparison   Web Hosting Technical Support   Web Hosting Resellers   Domain Name Resellers   My Account
DOMAINS: WWW.
Domain Resellers
Tell a Friend Recent Articles Bookmark
Home > Support > Php4

Installing PHP4

There are two different ways to install PHP4 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 PHP4 files are redirected by your Virtual Server web server.

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

  1. Upgrade Your Virtual Server Apache (if you aren't already running Apache 1.3).

  2. Install the PHP4 dynamic modules on your Virtual Server.

    FreeBSD PHP 4.0.0
    % vinstall php4-dso
    

    BSD/OS PHP 4.X.X
    unavailable
    

    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!

    The PHP4 configuration file will be created at ~/usr/local/lib/php.ini instead of ~/usr/local/lib/php3.ini as it was with previous versions of PHP3.

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

    LoadModule  php4_module  modules/MODULE-NAME
    

    Currently, these PHP4 dynamic modules are available.

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

    BSD/OS PHP 4.X.X
    unavailable
    

  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 Virtual Server 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 dynamic module.

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

      If you want to run PHP3 and PHP4 concurrently, add the following lines instead of those above.

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



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

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

    FreeBSD PHP 4.0.0
    % vinstall php4
    

    BSD/OS PHP 4.X.X
    unavailable
    

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

    FreeBSD PHP 4.0.0
    % vinstall php4
    % vinstall php4-msql
    % vinstall php4-mysql
    % vinstall php4-pgsql
    

    BSD/OS PHP 4.X.X
    unavailable
    

    The PHP4 configuration file will be created at ~/usr/local/lib/php.ini instead of ~/usr/local/lib/php3.ini as it was with previous versions of PHP3.

  2. Due to Security Issues the PHP4 CGI is installed at ~/usr/local/bin/php. Do the following to link the PHP4 CGI into your ~/www/cgi-bin directory.

    % cd ~/www/cgi-bin
    % ln ../../../bin/php php
    

  3. 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 Virtual Server 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 CGI executable.

      Action     php4-script /cgi-bin/php
      AddHandler php4-script .php .php3 .php4 .phtml
      


Sitemap | Domain Names | Web Hosting | Web Hosting Comparison | Expired Domain Names
Why Us? | Corporate | Support | Contact Us | Affiliates | Drop Names | Add Favorite : Web Hosting
Hosting Terms | Domain Terms | Privacy Policy   Copyright © 2007 - 4Domains.com Inc.
DOTPound - Domain Name Auctions     DNS Tools


web hostinghostingdomaindomain namedomain namescheap web hostingecommerce website designdomain registration

File Hosting | Security Scanner | Search Engine Status | Service Monitoring