Home › Forums › AFP548 Community › Projects › Easy PHP4 & PHP5 Configuration
PROJECT DESCRIPTION
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:
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:
/usr/local/php/libphp4.so
Make a new module entry for PHP5 with the following information:
module=php5_module
C File=mod_php5.c
Path=/usr/local/php5/libphp5.so
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.
Elgert,
I realize it was 4 years ago you posted this but it came in very handy for me. Thanks.
Jamie