Sign in to follow this  
Followers 0
Morpheus

PHP fails with Error: 403 Forbidden

1 post in this topic

It appears when the PHP Handler Mappings is added to the IIS Webserver there may be times it fails to propagate those settings to the IIS Default Web Site. This causes an Error 403 Forbidden to appear in the browser window when the section titled Testing IIS, and the PHP installation is executed.

There can be a couple of reasons why this Error: 403 Forbidden is being displayed.

  1. The section titled Configuring IIS for PHP, and the Windows Intrusion Detection Systems security console was not correctly configured.
  2. The section titled Configuring IIS for PHP, and the Windows Intrusion Detection Systems security console was correctly configured, but the PHP Handler Mappings did not propagate to the IIS Default Web Site.

It is recommended to go back to the section labeled Configuring IIS for PHP, and the Windows Intrusion Detection Systems security console, recheck all the settings to make sure they are correct, and then retest the section labeled Testing IIS, and the PHP installation. If the 'PHP' test is successful then continue on with the tutorial. If not come back and complete the below.

It's assumed that the Web Browser is still open, along with the terminal window. Close the Web Browser, and leave the terminal window open.

In the open terminal type 'c:\windows\system32\inetsrv\iis.msc' (less the outside quotes), tap the  'Enter' key, and the Internet Information Services (IIS) Manager opens.

Note: The Internet Information Services (IIS) Manager may opens and ask 'Do you want to get started with...' left-click 'No'.

On the left under 'Connections' the very top entry expand '<server name>', under <server name> expand 'Sites', left-click 'Default Web Site', in the center window titled 'Default Web Site Name' in the section labeled 'IIS', left-click highlighting 'Handler Mappings', on the right under 'Actions' and left-click 'Open Feature'.

In the center window titled 'Handler Mappings' there may be or may not be a 'PHP' entry listed under the 'Name' column. Scroll down the window and if there is a 'PHP' entry under the 'Name' column then left-click highlighting the 'PHP' entry, on the right under 'Actions' left-click 'X Remove', a 'Confirm Remove' message appears, and left-click 'Yes'.

On the right under 'Actions' left-click 'Add Script Map...', in the 'Request Path:' dialog box type '*.php' (less the outside quotes), in the 'Executable:' dialog box type 'd:\winids\php\php-cgi.exe' (less the outside quotes), in the 'Name:' dialog box type 'PHP' (less the outside quotes), left-click 'OK', the 'Add Script Map' notification message appears, left-click 'Yes', and exit the Internet Information Services (IIS) Manager.

 At the CMD prompt type 'iisreset /restart' (less the outside quotes), and tap the 'Enter' key.

 Go back to the section labeled Testing IIS, and the PHP installation and continue.

Edited by Morpheus

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0