I am using IIS7 on Windows Server 2008r2. I have recently installed php and IIS. I am trying to browse to the index.php but it returns a blank page. It loads the favicon and the header of my page. When I load an info.php file it is not blank.

If I disable Anonymus Authentication it the same index.php returns IIS 7.5 Detailed Error - 401.2 - Unauthorized.

What is strange is I installed this exact code onto another fresh IIS install I just did and it loads fine. Permissions for the directory are the same for both.

  • 1
    Anything of note in the IIS logs? – uSlackr Jan 9 '12 at 16:47

From the IIS click or select the site folder then in top right corner click permission

under security add "Network Service" which is equivalent of IISUSER

then restart the site and try


This Microsoft KB article is for IIS7, but works for 7.5 as well. I would recommend making your way through the article, and if your problem persists, please provide some screenshots of the errors (either in browser, or IIS log)


You also might want to just open a command prompt and type 'iisreset /force' to see if that resolves the issue. If not, go through the article mentioned above.

Let me know if you need any more information, or if that didn't help!


The most simple test you can do is create a text file called text.txt, put 'Hello World' in it, and then put it at the root. If the web server can present this file, then try the same thing with a HTML file. If these files can be served, you have some web site (permissions or IIS) tweaks/configs to work on. If not, you may want to re-install IIS/PHP from the ground up.

It's more than likely something with your PHP install but you need to rule if the website can serve up basic files first.


The easiest way to run PHP on an IIS server is to use the Web Platform Installer (see Installer link). This will step by step install PHP and ensure that it is able to run on your server/workstation.

Then I would recommend creating a php page with the following code to test:

<title>PHP Test</title>
<?php phpinfo(); ?>

See http://php.iis.net/ for more info


PHP Manager for IIS

This is pretty good about letting you use whatever version of PHP you want and handling all the necessary bindings and what not for you.

That said, I would verify that PHP is functioning properly by calling it from the command line targeting your index.php file and make sure that you get the output you'd expect there. That will tell you whether the issue is with the PHP implementation or IIS.


I had a similar problem and it was security settings. I had to give 'users' full access to the folder where phpmyadmin was installed. That worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.