Configure the PHP + IIS environment in Windows XP

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.