Configure the PHP + IIS environment in Windows XP
If you download the installed PHP version, you can choose to use IIS during installation. After installation, IIS is automatically configured. If you download the zip version, follow these steps:
1. Unzip the PHP-5.1.2 zip (the latest version) to c: \ PHP (you can choose a directory, this example to illustrate ).
2. Copy PHP. ini-Dist to the C: \ Windows directory and change it to PhP. ini. Copy php5ts. dll and libmysql. DLL to c: \ windows \ system32.
3. Set in IIS to enableDefault website-> attributesDialog box, switch to"Main directory"Tab, and then click"Configuration"Button to open"Application configuration dialog box", Click"Add"Button to open"Add/edit application extension ing"Dialog box. In theExecutable files"In the input box, point to c: \ PHP \ php5isapi. dll, in the"Extension"Input in the input box". Php"(Note:". "is required in Windows XP, and does not seem to be required in windows. Excluding quotation marks), and select the check boxes "Script Engine" and "check whether the file exists" to confirm and exit IIS.
Image 1, big image 2, address
Now the server should be able to support PHP. Next we will configure PHP. ini to support MySQL and Gd libraries.
1. Search for "extension_dir" in notepad, and then set extension_dir = "./"
Change to extension_dir = "C: \ PHP \ Ext"
2. In notepad, find "; Extension = php_mysql.dll" and "; Extension = php_gd2.dll", and then remove the preceding ";" to change extension = php_mysql.dll to extension = php_mysql.dll.
Change; Extension = php_gd2.dll to extension = php_gd2.dll
3. Save PHP. ini and restart IIS.
Note:
1. When the configuration is complete, I can browse the HTML file under wwwroot, but cannot open the. php file. The prompt is: "HTTP Error 403-Access prohibited", which is not solved at noon. Later, I found a saying on the Internet that "403.1 error is caused by" execution "access being disabled. If I try to execute CGI, ISAPI, or other executable programs from the directory, however, this error occurs when the program cannot be executed in this directory. ", So select the execution permission in the default website-> attribute as script and executable file. The problem is solved.