I2059: Installing the PHP interpreter plug in modules
Summary
Product: FreeProxy
Versions: 3.9 onwards
Note: 2059 (Superceded by Version 4.00)
Date reported: 11 June 2005, 22 August 2007
Superceded by Version 4.00 of the Internet Suite. Please rather download this version as the configuration is now done in the FreeProxy Control Centre and NOT in the registry.
Issue Detail
Installing the php interpreter plugin
Solution
Download and setup
As a start, read the plug-in technical notes and the config guide. See here.
Download the php 5 install file from http://www.php.net. Unpack the downloaded file to an appropriate directory. For example C:php5.
You can either download the php5 install from the download area or set up manually. To download do the following:
Download the php5 install for version 5.0.4.4.
The install expects php to have been installed in c:\php5
Stop FreeProxy
Set up a IP Service - see the help file for details
If you install a different version of php than 5.0.4.4, then overwrite the 2 DLLs php5isapi.dll and php5ts.dll and copy the file php.ini as described below for manual installations, taking the files from the php install directory
For a manual installation
Copy the files php5isapi.dll and php5ts.dll to (Win98/Me) C:\WINDOWS or (WinNT/2000) C:\WINNT\SYSTEM32 or (WinXP, 2003) C:\WINDOWS\SYSTEM32.
Copy file php.ini-recommended to the same windows directory you copied the DLL files to. Rename this file to php.ini.
Edit/Create the windows registry key HKLM/Software/Hand-Crafted Software/FreeProxy/Plugin if it has not already been created. Under Plugin, create a new key called Implementation. Under Implementation create a new key called PHP. Click on the PHP key you have just created and create the following 4 string values:
Description with a value of PHP Interpreter
DLL with a value of php5isapi.dll
ScriptExtension with a value of PHP
Type with a value of ISAPIEX
Edit the windows registry key HKLM/Software/Hand-Crafted Software/FreeProxy/Plugin. Under Plugin, create a new key called VirtualPaths if it has not already been created. Under VirtualPaths create a new key called PHPTestApplication. Under PHPTestApplication create the following 4 string values:
ImplementationKey with a value of PHP.
PhysicalPath with a value of C:\temp\phptest.
PluginDescription with a value of PHP Tests.
URLPath with a value of /phptest
Copy the code in the section below and place into a file in directory C:\temp\phptest with the name of FPTest.php. If you store the file in different directory, then the name of the directory should be placed in the PhysicalPath registry value (replacing C:\temp\phptest)
The code for the file C:\temp\phptestFPTest.php is as follows:
Code:
<html>
<head>
<title>FreeProxy/FreeWeb test script</title>
</head>
<body>
<print>
</body>
</html>
Testing
To test the plugin, make sure you have set up a FreeProxy IP Service. If not, in the FreeProxy Control Centre
Click on IP Service.
Set up the web service.
Save FreeProxy
Now Start FreeProxy. Start a browser session on a client PC and connect to the server running FreeProxy (assume the server running FreeProxy is called myserver.) Use the following URL.
http://myserver/phptest/FPTest.php
You should see a response similar to this:
Code:
1 June 11, 2005Congratulations, you have installed php correctly