Home Forums AFP548 Community Projects Easy PHP4 & PHP5 Configuration

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #359844


    This is a fast and simple way to update your server to use the lastest PHP4 and PHP5 each featuring PDFLib and GD2 among other necessary options. Once completed you will be able to switch between the two versions of PHP using the Server Admin GUI.

    May 2006 update: Recent security issues with PHP4 make it important to utilize the latest release of PHP4 to keep your server secure. These instructions rely on installers for an older PHP4. If you need PHP4 I suggest using this installer for PHP 4.4.2:



    Step 1: Download PHP4 & PHP5 packages

    Download the following delicious packages from entropy.ch:

    PHP 4.3.11

    PHP 5.1.2

    Install both of these packages. Note, if you are only interested in one or the other, simply install the package that most interests you. At the time of this writing few PHP applications operate correctly under PHP5 but you may wish to install it for testing. The Entropy PHP 4.3.11 package is the latest PHP4 install and features a wide scope of additional features that are required by many PHP applications, primarily GD2 for generating graphics dynamically from MySQL database information.


    Step 2: Edit httpd.conf file

    Open your /etc/httpd/httpd.conf file in an editor and comment out the active lines inserted by the entropy.ch installer found at the bottom including:

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    DirectoryIndex index.php index.html


    Step 3: Edit modules in Server Admin

    Connect to your server in Server Admin and go to the modules tab for the web server.

    Edit the php4_module entry by changing its Path to the following:


    Make a new module entry for PHP5 with the following information:

    C File=mod_php5.c


    Step 4: Edit PHP settings

    At this point you can enable either you PHP4 or PHP5 module and save the settings within Server Admin.

    Note that depending on what PHP software you are planning to use on your server you may need to edit your PHP settings concerning items such as register_globals and magic_quotes.



    I realize it was 4 years ago you posted this but it came in very handy for me. Thanks. Smile


Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Comments are closed