In running CGI mode, PHP checks the installation directory of php.ini files. Below are the steps to configure PHP in CGI mode:
1. Download the PHP4 Zip file on the windows server.
2. Unzip the PHP4 Zip file and install it on the default directory C:/php4
3. Copy the php.ini-recommended and paste it in PHP4 directory and rename it to php.ini.
4. Open php.ini file in notepad and search for the below mentioned line:
;cgi.force_redirect = 1
5. Change the above mentioned line to disable the force_redirect as shown below:
cgi.force_redirect = 0
6. Save the file.
7. Download the PHP5 Zip file on the same windows server.
8. Unzip the PHP5 Zip file and install it on the default directory C:/php5
9. Copy the php.ini-recommended and paste it in PHP5 directory and rename it to php.ini.
10. Open php.ini file of PHP5 in notepad and search for the below mentioned line:
;cgi.force_redirect = 1
11. Change the above mentioned line to disable the force_redirect as shown below:
cgi.force_redirect = 0
12. Save the file.
13. Set C:\php4\php.exe to be the “PHP App.path” in the HELM web service.
14. Set script map to C:\php5\php-cgi.exe. The administrator can set script map using the below mentioned steps:
a. Open HELM home page.
b. Click on HELM extensions.
c. Click on Hex Setup.
d. Click on PHP Versions.
e. Click on Add New and enter as PHP5 and set the script map.
From the above mentioned steps you should be able to switch between the two versions of PHP from HELM control panel.
1. Download the PHP4 Zip file on the windows server.
2. Unzip the PHP4 Zip file and install it on the default directory C:/php4
3. Copy the php.ini-recommended and paste it in PHP4 directory and rename it to php.ini.
4. Open php.ini file in notepad and search for the below mentioned line:
;cgi.force_redirect = 1
5. Change the above mentioned line to disable the force_redirect as shown below:
cgi.force_redirect = 0
6. Save the file.
7. Download the PHP5 Zip file on the same windows server.
8. Unzip the PHP5 Zip file and install it on the default directory C:/php5
9. Copy the php.ini-recommended and paste it in PHP5 directory and rename it to php.ini.
10. Open php.ini file of PHP5 in notepad and search for the below mentioned line:
;cgi.force_redirect = 1
11. Change the above mentioned line to disable the force_redirect as shown below:
cgi.force_redirect = 0
12. Save the file.
13. Set C:\php4\php.exe to be the “PHP App.path” in the HELM web service.
14. Set script map to C:\php5\php-cgi.exe. The administrator can set script map using the below mentioned steps:
a. Open HELM home page.
b. Click on HELM extensions.
c. Click on Hex Setup.
d. Click on PHP Versions.
e. Click on Add New and enter as PHP5 and set the script map.
From the above mentioned steps you should be able to switch between the two versions of PHP from HELM control panel.