The purpose of this article is to show you how to configure PHP4 in your iis5. I use the Chinese version of Windows2000Professional, IIS5, and PHP4.0RC1-Win32. This preview version of PHP4 is a pre-release version after four beta tests. it can be downloaded from PHP official site www.php.net. Do not download the correct P IIS5.0IIS.
The purpose of this article is to show you how to configure PHP4 in your iis5. I use Windows Professional, IIS5, and PHP4.0RC1-Win32. This preview version of PHP4 is a pre-release version after four beta tests. it can be downloaded from PHP official site www.php.net. Note that the PHP4.0 Release Candidate 1 Source is prepared for Unix users. you need PHP 4.0 Release Candidate1 Binaries for Win32.
Note: First you need to install IIS5, because Win2000 Professional forgets it by default. The IIS5 installation method does not need to be discussed here. if you have any questions, please refer to other materials.
OK!
Step 1: uncompress the PHP4.0RC1-Win32.ZIP package. you can put it under C: \ PHP4.
Step 2: Copy the php. ini-dist file under C: \ PHP4 to the WINNT directory and change it to php. ini. You can run it without modifying any parameters. you can modify some parameters according to different situations.
Step 3: Copy C: \ PHP4 \ Projects \ php4 \ Release_TS_inline \ php4ts. dll to the C: \ WINNT \ system32 directory.
Step 4: click Start/run and enter cmd to start the command line.
Step 5: input the command mmc \ winnt \ system32 \ compmgmt. msc on the command line to start Computer Management.
Step 6: expand "services and applications"/"Internet information services" in the computer management window, right-click the "default Web site", and select Properties, the "default Web site properties" window is displayed:
Step 7: Click "ISAPI filter" in the "default Web site properties" window and click "add, in the pop-up "filter properties" window, enter "PHP" in "filter name", and enter "C: \ PHP4 \ Projects \ php4 \ sapi \ isapi \ Release_TS_inline \ php4isapi. dll ", OK.
Step 8: click the "main directory" tab in the "default Web site properties" window, click the "configuration" button, and click the "add" button in the "application configuration" window that appears, in the displayed "add/edit application extension image" dialog box, enter "C: \ PHP4 \ Projects \ php4 \ sapi \ isapi \ Release_TS_inline \ php4isapi" in the "executable file" text box. dll, enter ". php "(be sure to have that point), OK.
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 the related services. A: Yes.
Step 10: Enter the "net start w3svc" command to restart the IIS service.
OK, your configuration is over. let's write a PHP program and test whether the configuration is successful! Edit a file named hello. php with the following content:
Echo "Hello, World! ";
?>
Save the file to the default Web node's default file directory (C: \ Inetpub \ wwwroot), open the browser, and enter localhost/hello in the address bar. php, if it goes well, the classic "Hello, World!" It should appear in your browser. If the page cannot be found and you can confirm that the preceding steps are correct, enter the address 127.0.0.1/hello in the address bar of the browser. php: If it succeeds, it indicates that your hosts file is faulty. edit the hosts file under C: \ WINNT \ system32 \ drivers \ etc and add "127.0.0.1 localhost.
Come on, start your PHP journey!