The purpose of this article is to tell you how to configure PHP4 into your IIS5 under Win2000 Professional. I use Windows2000 Professional Chinese version, IIS5 Chinese version and PHP4.0RC1-Win32. This preview version of PHP4 is a pre-release version after 4 beta tests and can be downloaded from PHP's official site www.php.net. Be careful not to download the wrong one. The PHP4.0 Release Candidate 1 Source is prepared for Unix users. What you need is the PHP 4.0 Release Candidate1 Binaries for Win32.
Note that you need to install IIS5 first, because Win2000 Professional forgets it during the default installation. There is no need to discuss the installation method of IIS5 here. If you have any questions, please refer to other information.
OK!
The first step is to unzip the PHP4.0RC1-Win32.ZIP compressed package. You can put it under C:PHP4.
The second step is to copy the php.ini-dist file under C:PHP4 to the WINNT directory and rename it to php.ini. You don't need to modify any parameters to run it. Of course, you can modify some parameters according to different situations.
The third step is to copy C:PHP4Projectsphp4Release_TS_inlinephp4ts.dll to the C:WINNTsystem32 directory.
The fourth step is to click Start/Run and enter cmd to start the command line.
Step 5: Type the command mmc winntsystem32compmgmt.msc on the command line to start computer management.
Step 6: Expand "Services and Applications"/"Internet Information Services" on the computer management window, right-click on "Default Web Site" and select Properties. The system will pop up "Default Web Site Properties" Window:
Step 7: Click the "ISAPI Filter" tab on the "Default Web Site Properties" window, click the "Add" button, and enter the "Filter Name" in the pop-up "Filter Properties" window. "PHP", enter "C:PHP4Projectsphp4sapiisapiRelease_TS_inlinephp4isapi.dll" in "Executable File", OK.
Step 8: Click the "Home Directory" tab in the "Default Web Site Properties" window, click the "Configure" button, click the "Add" button in the pop-up "Application Configuration" window, and click the "Add" button in the pop-up "Application Configuration" window. In the "Add/Edit Application Extension Image" dialog box, enter "C:PHP4Projectsphp4sapiisapiRelease_TS_inlinephp4isapi.dll" in the "Executable File" text box, and enter ".php" in the "Extension" text box (note that there must be that dot ),Sure.
Step 9: Return to the command line window and enter the "net stop iisadmin" command to terminate the IIS service. The system will ask you if you want to stop related services, answer yes.
Step 10, enter the "net start w3svc" command to restart the IIS service.
OK, your configuration is now over. Let’s write a PHP program to test whether the configuration is successful! Edit a file named hello.php with the content:
echo "Hello, World!";