In the IIS7.0 on the fastcgi way to configure the PHP operating environment, the test can normally run the PHP program, the PHP program to deploy, import the original data and configuration information. It's going to be a problem. Let's write down the details below.
Today you are ready to put a PHP demo running under IIS, and the Web site is configured like this under IIS:
The application pool is the. NET Framework 2.0 (2.0 or 4.0) in Integrated mode, because PHP is running in a fastcgi way, the application pool identity is configured as a built-in IIS NetworkService, and authentication is used for anonymous authentication.
Open a local Web site, access to the PHP page, there are 500 errors.
Well, it's a permissions issue, and the simplest solution is to set the C:usersadministratorphpstormprojectsphpdemo permissions to everyone and allow Full Control:
Re-access to the PHP page, successful:
The above method is simple enough, but also too unsafe, usually local to take a demo this do no problem, really on the line, so sooner or later the problem.
Then reset, the directory read-only permission assigned to the Netwrorkservice account and try again
However, the problem was not resolved, when the visit, there were 401 errors
The error message includes displaying the logged-in user as anonymous, checking the authentication under the Web site (and then clicking Anonymous Authentication-> Edit), the original web site by default, when the login method is anonymous, use the default login user for IUSR (that is, we see the anonymous logged-in user)
So the solution is:
1. Set IUSR to C:usersadministratorphpstormprojectsphpdemo Read permissions, similar to the previous settings for NetworkService.
2. Or choose to use the application pool identity.
After trial, methods 1 and 2 were successful.
Note:networkservice in IIS7 subordinate to the Iis_iusers user group, before the NetworkService settings can also be changed to the iis_iusers settings, the same can also solve the problem, but the permissions have been further relaxed.
The above is the entire contents of this article, I hope you can enjoy.