0

I am trying to setup PHP and MySQL on a Windows Server that is currently in Azure cloud using the information from this blog post.

Now I am testing the PHP installation using the methods specified in that tutorial. Here are the steps:

  1. Open C:\inetpub\wwwroot and add an index.php.

  2. Save the file then go to xxxx.cloudapp.net/index.php

But when I do that I get:

404 file or directory not found error

I can see the default page at xxx.cloudapp.net in the browser, but can’t see the PHP file in browser.

2
  • i am checked ,its ok how to check the ownership permissions of that file?.also i have message restart pending in server manager console,so how can i restart it? May 22, 2015 at 6:44
  • Not really a question for superuser. Probably best on Server Fault. May 22, 2015 at 8:01

1 Answer 1

1

There are a few things to check:

  • Have you enabled PHP over FastCGI with a module mapping?: enter image description here

  • Have you added a default document type? enter image description here

  • Have you definitely made sure the php file is in the same directory as the default doc page?

  • have you recycled the app pools since adding the PHP instance?

Possibly none of these, but these are common pitfalls I've seen when deploying multiple PHP/IIS instances before.

It might be worth following the guide at: http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis for installing IIS properly on IIS

Also, check that your file extensions are correct. Some texzt editors will save files as index.php.txt or as index.PHP (note that extensions ARE case sensitive)

10
  • where is this settings given i am new to windows server:) May 22, 2015 at 9:20
  • look at the screenshots, they show you where the settings are. Also try following this guide: iis.net/learn/application-frameworks/…
    – Fazer87
    May 22, 2015 at 9:21
  • ok let me try that May 22, 2015 at 9:30
  • the two thing you mentioned in screenshots are already done. May 22, 2015 at 9:36
  • does your php file have an uppercase or lowercase extension?? index.php and index.PHP are seen as different files. You can check in command line by going to cd C:\inetpub\wwwroot and then typing DIR
    – Fazer87
    May 22, 2015 at 9:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .