First, make sure the php page can run properly. If the php page can access the database, you should be fine.
405 errors tend to deal with POST errors.
The file type is not registered in the IIS script map settings (e.g. .html or .htm). IIS only allows HTTP requests of type to GET to unmapped files. HTTP requests of type POST, HEAD, and all others are responded to with a 405 resource not allowed error.
Add a script map for the extension. A script map associates a particular file type with a given script module. The web server runs the module on the given file and sends the output to the browser, instead of sending the file directly to the browser.
- Go to "Control Panel"-"Administrative Tools"-"Internet Information Services".
- Expand the tree to "COMPUTERNAME"-"Web Sites"-"Default Web Site".
- Right-click on "Default Web Site" and select "Properties". (Alternately, select "Default Web Site" and press Alt+Enter.)
- Select the "Home Directory" tab.
- Click the "Configuration" button.
- From the "Mappings" tab, select the "Add" button.
- Click the "Browse..." button, and find your php drivers
- Type ".html" (without quotes) in the "Extension" box.
- Select the "Limit to:" radio button, and type in "GET, POST" (without quotes) in the box next to it.
- Click the "OK" button and close all the dialogs. (If the "OK" button is greyed out, then make sure all the entries are correct and try clicking in the file name box.)