How to configure PHP under IIS

Source: Internet
Author: User

    1. 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 with Notepad php.ini file php.ini Find register_globals = off to change off to on.
      Find Extension_dir = "./" bar./"in the./change 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.
    2. Set IIS to support PHP
      Add a new Web extension service. By
      Start → programs → administrative tools → Internet Information Services (IIS) Manager open IIS Manager. Select 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. Add an ISAPI filter. By
      Internet Information Services (IIS) Manager → web site → properties → ISAPI filters → add filter Name: PHP executable: PHP directory php5isapi.dll. Add a PHP mapping file.
      Select Internet Information Services (IIS) Manager → web site → default Web site → properties → home Directory → configure mappings → add executable: Php directory Php5isapi.dll extension:. php. Add home Default file. Select Internet Information Services (IIS) Manager → web site → default Web site → properties → home directory → documents. Add index.php Home file.
    3. Set related permissions
      Set PHP folder permissions. Open the PHP folder and 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. If the setting is wrong, please correct it. Because joining everyone does not guarantee security. Set site folder permissions. Specific settings as described above. Only the folder path is different.
    4. Test
      Restart IIS.
      View the PHP home page file. Test the page. Enter the IP address of the computer in the browser.

How to configure 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.