0

I cannot figure out for the life of me what user IIS 10 is running as.

Here's what I've tried:

<hostname>\IIS_IUSRS

<hostname>\IUSR

Gave them Read + Write + Execute on

C:\php

and

C:\inetpub\wwwroot

and I still get the error:

HTTP Error 500.0 - Internal Server Error
The FastCGI process has failed frequently recently. Try the request again in a while

(This happens when trying to open localhost\phpinfo.php)

And yes, I followed all the steps from the manual install section in https://technet.microsoft.com/en-us/library/hh994592(v=ws.11).aspx

Except I skipped the WinCache part because they host it on SourceForge; I have successfully gotten php 5.6 (x86) Non-Threaded to run without WinCache... but this time it just will not work

EDIT

Found an error in C:\inetpub\logs\* that looks like this

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2017-09-11 21:14:43
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2017-09-11 21:14:43 ::1 GET /phpinfo.php - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/60.0.3112.113+Safari/537.36 - 500 0 3221225781 403
2017-09-11 21:15:10 ::1 GET /phpinfo.php - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/60.0.3112.113+Safari/537.36 - 500 0 3221225781 48
2017-09-11 21:15:20 ::1 GET /phpinfo.php - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/60.0.3112.113+Safari/537.36 - 500 0 3221225781 49
2017-09-11 21:15:27 ::1 GET /phpinfo.php - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/60.0.3112.113+Safari/537.36 - 500 0 3221225781 62
Kellen Stuart
  • 7,775
  • 7
  • 59
  • 82
  • Have you checked your server error logs? A 500 error just means "There's an error somewhere" but the server error logs will give you a lot more information. – aynber Sep 11 '17 at 20:15
  • Find location of log files. You can find them in your php.ini. If they do not exist, create them in right location. Reload the page and it will log the error message. – codelogn Sep 11 '17 at 21:01
  • @Code_O1logn in `php.ini` `error_log = C:\inetpub\wwwroot\debug.txt` and the file doesn't exist – Kellen Stuart Sep 11 '17 at 21:02
  • Create the file, give it appropriate permission and reload the page. See if you can see the errors now. – codelogn Sep 11 '17 at 21:03
  • @Code_O1logn No errors in `C:\inetpub\wwwroot\debug.txt`, but I found error in `C:\inetpub\logs` see my question – Kellen Stuart Sep 11 '17 at 21:16
  • See my answer and see if you can see the error messages now. – codelogn Sep 11 '17 at 21:22
  • Also, that's for only php related error messages. For web server related error messages, see here: https://stackoverflow.com/questions/6426375/where-can-i-find-the-iis-logs – codelogn Sep 11 '17 at 21:48

2 Answers2

0

In your php.ini, set the following variables and restart the web server.

log_errors=1
display_errors=1
error_reporting=-1
codelogn
  • 353
  • 1
  • 3
  • 13
0

Believe it or not, I tried running the Microsoft Web Platform Installer 5.0, selected the PHP version I wanted and BAM, it worked. Apparently I was missing MSVC11 (Visual C++ 2012) which is a compiler that PHP needed to run.

I highly suggest if you are trying to install PHP on IIS 10.0 that you consider using the Installer over the manual install; would have saved me hours of headache.

Kellen Stuart
  • 7,775
  • 7
  • 59
  • 82