Link to home
Start Free TrialLog in
Avatar of SITPL
SITPL

asked on

How to configure a PHP website on IIS?

Hi,
I want to configure a PHP website on IIS. I have XAMPP installed on the server and my PHP pages run absolutely fine through XAMPP.
I want to run my site through IIS. I have got my site started but when browsed it gives error ERR_NAME_NOT_RESOLVED.
I have followed this instructions and some others but with no luck.
I am new to PHP and IIS, so any help would be appreciated.
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

IF you browse to the IIS server directly (no sub-folders) do you get a page.
What is the URL you are using to access your page
Have you tried putting a normal .html file there and browsing to that.

If you can't browse to . html file on that URL then the problem is not PHP it is IIS - you need to configure that first and make sure you can browse to a normal .html file in your PHP script directory.

Once that is done attempt to access a simple PHP script
<?php
echo "Hi There!"

Open in new window

1. Have you correctly installed PHP in IIS? It's not done by default and needs to be done separately or by using the Web Components Installer: https://www.microsoft.com/web/downloads/platform.aspx

2. Have you added the homepage of the application to the default document for the site?

3. If you have IIS and XAMPP running on the same server, have you setup separate port bindings for each site running on them otherwise you may have a conflict.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.