Configuring PHP under IIS

Source: Internet
Author: User

Download the PHP installation package for Windows first. The package is then decompressed to the C:\PHP. After completing the above steps, rename the Php.ini-dist file in the C:\php directory to php.ini and copy it to the C:\Windows directory.

Open the C:\Windows directory php.ini file with Notepad

Locate register_globals = off to change off to on.

Find Extension_dir = "./" To change the path to the location of the ext in PHP, such as "C:\php\ext".

Finally, the PHP directory under the Php5ts.dll copy to the C:\WINDOWS\system32 directory. Complete the installation steps for PHP at this point.

Set IIS to support PHP


To add a new Web Extension service:
Internet Information Services (IIS) Manager → Web service extensions → add a new Web service extension.

Add: Php directory php5isapi.dll, Name: PHP set extension state to allow: √. Select OK when you are finished.

To add an ISAPI filter:
Internet Information Services (IIS) Manager → web site → properties → ISAPI filters → add filter Name: PHP executable, point to Php5isapi.dll in PHP directory.

To add a PHP mapping file:
Internet Information Services (IIS) Manager → web site → default Web site → properties → home directory → configuration mappings → add executable: Php directory Php5isapi.dll extension:. php..

Add home Default file:

Internet Information Services (IIS) Manager → web site → default Web site → properties → home directory → documents. Add index.php Home file.

Set permissions for Site folders
Add the Everyone and IUSR and IWAM user rights. View related information Just add IUSR user rights Yes, but I personally tried. If you do not join the Everyone user, the execution is unsuccessful.

Configuring PHP under IIS

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.