Home  >  Article  >  Backend Development  >  windows2000 PHP4 installation under Windows2000

windows2000 PHP4 installation under Windows2000

WBOY
WBOYOriginal
2016-07-29 08:34:19789browse

The purpose of this article is to tell you how to configure PHP4 into your IIS5 under Win2000 Professional. I am using Windows2000 Professional English version, IIS5 English version and PHP4.0.4-Win32 Binaries, which can be downloaded from PHP's official site www.php.net. Be careful not to download the wrong one. The PHP4.0.4 Release Candidate 1 Source is prepared for Unix users. What you need is the PHP 4.0.4 Release Candidate1 Binaries for Win32.
 Note, 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.0.4-Win32.ZIP compressed package. You can put it under C:PHP4.
 Second step, 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:PHP4php4ts.dll to the C:WINNTsystem32 directory.
 The fourth step, click start->programs->adminstrative tools->internet service manager
 The fifth step, expand "Services and Applications"/"Internet Information Services" on the computer management window, click "Default Web" Right-click the "Site" and select Properties. The system will pop up the "Default Web Site Properties" window
Step 6. Click the "ISAPI Filter" label on the "Default Web Site Properties" window and click the "Add" button. In the pop-up "Filter Properties" window, enter "PHP" in the "Filter Name", enter "C:PHP4sapiphp4isapi.dll" in the "Executable File", and confirm.
 Step 7: 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 "Add" window. In the "Edit Application Extension Image" dialog box, enter "C:PHP4sapiphp4isapi.dll" in the "Executable File" text box, and enter ".php" in the "Extension" text box (note that there must be that dot), Sure.
 Step 8, 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.
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!";
?>
Save this file in the default file directory of the default Web node (C:Inetpubwwwroot ), then open the browser and enter localhost/hello.php in the address bar. If everything goes well, the classic "Hello, World!" should appear in your browser. If the page cannot be found and you can confirm that the above steps are OK, then try entering the address 127.0.0.1/hello.php in the address bar of the browser. If it succeeds, it means there is a problem with your hosts file. , please edit the hosts file under C:WINNTsystem32driversetc and add the line "127.0.0.1 localhost".
Okay, let’s start your PHP journey!

The above introduces the installation of windows2000 PHP4 under Windows2000, including the content of windows2000. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn