How to run a PHP application in IIS?

5

I have a website in PHP that I want to install on IIS (Apache for Windows is not an option).

It will not run naturally as a .NET application.
So I've already downloaded a PHP release on link , but I still have to configure IIS to interpret the application in PHP using these dll's .

How do I do this?

    
asked by anonymous 23.06.2014 / 18:48

2 answers

9

This is the hard way.

Try the following steps using the Windows Platform Installer: link

  • At the top of the Web Platform Installer window, click Products .
  • Click Structures and select the current version of PHP. (As of this date, the current version is PHP 5.3.13.)
  • Click Install .
  • The Web Platform Installation page displays the version of PHP and its dependencies that will be installed.
  • Click I accept .
  • Web PI installs PHP packages.
  • Click Finish .
  • 23.06.2014 / 18:55
    2

    The version to run with IIS from php will be NTS. Download here: link . - Updated link to the latest version of 06/07/2017

    After downloading, unzip and modify these lines within php.ini:

    ;cgi.force_redirect = 1
    ;cgi.fix_pathinfo=1
    ;fastcgi.impersonate = 1
    

    Remove the; and modify the cgi.force_redirect directive to 0. It will look like this:

    cgi.force_redirect = 0
    cgi.fix_pathinfo=1
    fastcgi.impersonate = 1
    

    Open the Run menu (Windows + R key) and type appwiz.cpl and go to Turn Windows features on or off , look for Information Services of internet - > World wide web services - > Application Development Resources , check the CGI option for IIS to be able to process CGI and FASTCGI applications. After that, go back to the run menu and type inetmgr to open the IIS manager. Inside the manager look for Manipulator Mappings , double-click with the left button and in the right corner Add Module Mapping . It will open an equal screen of the image below, change and give OK. IIS is now ready to process pages in php.

    Go back to the previous page, go to Default document and in the right corner Add add index.php.

        
    26.09.2016 / 15:09