HTTP 500 Error on php document IIS 8 and PHP 7.0.2
I'm trying to migrate my LAMP application to Windows/IIS. I have a Windows 2012 R2 server. I'm following the instructions at https://technet.microsoft.com/en-us/library/hh994592.aspx (modified slightly: I used add-windowsfeature Web-Server -includeAllSubFeature to install IIS +CGI). I have the vc++ 2015 redist installed (both x86 and x64). PHP 7.0.2 is installed at d:\php. IIS Module Handler for php is configured:
name : PHP_via_FastCGI path : *.php verb : * modules : FastCgiModule scriptProcessor : D:\php\php-cgi.exe resourceType : Either requireAccess : Script
d:\php is in the PATH environment variable. My php.ini settings are the php.ini-development settings with these changes:
- extension_dir = "ext"
- cgi.force_redirect = 0
- fastcgi.impersonate = 1
- fastcgi.logging = 0
- extension=php_ curl.dll
- log_errors = On
- error_log = syslog
The above configuration works on a Windows 7 desktop and on a 2012 R2 server NOT joined to the corporate domain, but on two 2012 R2 servers in the domain I get a 500 Internal Server error when trying to launch http://localhost/test.php.
<?php phpinfo(); ?>
I'm not seeing any error information in the Windows Event log.
Running "php c:\inetpub\wwwroot\test.php" in the cmd window gives me the expected phpinfo.
I have checked the NTFS permissions on the d:\php folder and the c:\inetpub\wwwroot folder. They are too many to list, but SYSTEM has full control on both folders and the WWWPublishing service is running as Local System.
Any ideas of what to look for to find out why this isn't working?
As it turns out the IIS_IUSRS group needed full-control NTFS access to the d:\php folder.