Helm Extensions: Setup Guide For Side by Side PHP 4 & 5
Helm Extensions: Setup Guide For Side by Side PHP 4 & 5
May 2005
Paul Woodland, PW New Media
www.pwnewmedia.com
Introduction
This document provides information on how to setup both PHP4 and PHP5 on the same
server, so that it can then be used with Helm Extensions to allow customers to select
which version they wish to use.
Requirements:
- The latest version of PHP 4.3.x from www.php.net distributed as a ZIP file
- The latest version of PHP 5.0.x from www.php.net distributed as a ZIP file
- Helm Extensions v1.0 or higher, Professional Edition
- Access to remote desktop for the server in question
Which ever way you decide to go for, PHP 5 will have to run in CGI mode. This is a
limitation of PHP, it is not possible to setup two copies of PHP using ISAPI on the same
server, unless they share the same php.ini file (which PHP4 & 5 can not). A way around
this may be included in a future Helm Extensions release.
The first way of setting up whcih this guide explains is having PHP4 running in CGI mode,
and the second is having it in ISAPI mode - both have their positive and negatives, it is up
to the server administrator to choose which they prefer.
1. If you have previously had PHP on this server, ensure that there are no php.ini files in
your windows directory, or any php dll’s
2
2. Unzip the PHP4 ZIP file to C:\php4 (you can use any location you wish, as long as you
use the same one all the way through this guide)
Change the last line to disable force_redirect, so that it looks like this:
cgi.force_redirect = 0
Make any other modifications that you wish to, and save the file.
4. Now unzip the PHP5 zip to C:\php5, and once again make a copy of php.ini-
recommended called php.ini. Again, open it in notepad and peform the same change as
for PHP4 in step 3
5. Ensure that neither of the PHP directories appear in your windows path (they shouldn’t
do unless previously put there)
6. Set C:\php4\php.exe to be the “PHP App. Path” in your Helm web service.
7. As an administrator, from the Helm home page click on “Helm Extensions” -> “System
Settings” -> “PHP Versions”. Click on “Add New”. Enter a title such as “PHP 5”, and set the
script map to C:\php5\php-cgi.exe
You should now be able to switch between the two versions of PHP from your Helm
control panel. To test which version is being used, you can use a php file on your website
such as this info.php :
<?phpinfo()?>
1. If you have previously had PHP on this server, ensure that there are no php.ini files in
your windows directory, or any php dll’s
2. Unzip the PHP4 ZIP file to C:\php4 (you can use any location you wish, as long as you
use the same one all the way through this guide)
3
3. Make a copy of php.ini-recommended, and rename it to php-isapi.ini. Place this file in
your windows directory. Open up this file and search a line such as:
extension_dir = “./”
In this line, enter your PHP4 extensions directory as below and save the file:
extension_dir = “C:/php4/extensions/”
4. Now unzip the PHP5 zip to C:\php5, and once again make a copy of php.ini-
recommended called php-cgi-fcgi.ini and place this in your windows directory. Open
up this file and search for the extensions directory line again. Place the PHP 5 directory in
this time, like this:
extension_dir = “C:/php5/extensions/”
6.In the same php.ini file, search for the area that looks like this:
Change the last line to disable force_redirect, so that it looks like this:
cgi.force_redirect = 0
5. Ensure that neither of the PHP directories appear in your windows path (they shouldn’t
do unless previously put there)
6. Set C:\php4\sapi\php4isapi.dll to be the “PHP App. Path” in your Helm web service.
7. As an administrator, from the Helm home page click on “Helm Extensions” -> “System
Settings” -> “PHP Versions”. Click on “Add New”. Enter a title such as “PHP 5”, and set the
script map to C:\php5\php-cgi.exe
You should now be able to switch between the two versions of PHP from your Helm
control panel. To test which version is being used, you can use a php file on your website
such as this info.php :
<?phpinfo()?>
4
Having Problems?
If you have followed all the instructions in this guide and are still having problems
setting up PHP, you should consult the PHP manual or ask for assistance from other PHP
users. You can also try our forums at http://forums.helmextensions.com. Our support staff
can not assist with the setting up of PHP itself.
If you are having problems with getting Helm Extensions to switch between two
copies of PHP you know are working correctly, you can contact our support staff via the
methods listed here:
http://www.helmextensions.com/support
Helm Extensions
Setup Guide for Side by Side PHP 4 & 5
for Version 1.2.0
Guide Revision 1
www.helmextensions.com
www.pwnewmedia.com