Php – 401 error after updating php on IIS

iis-7PHP

After updating PHP on my IIS 7 server, I am getting authentication error. The website is using Windows Authentication.

I updated from a PHP 5.2.14 to 5.3.8 using the Web Platform Installer. Once the sessions expired for everybody, none could log in again using their windows password.

I tried to change the security setting of the php installation folder, but it did not work.

Is there is another folder for php that I need to give access to my group of users?

I changed the security of the temp folder to add the users group so that they can create a session, but it still fail. Should I move my session path folder?

[02-Dec-2011 11:16:42] PHP Warning:  session_start(): open(C:\Windows\temp\sess_5dvl2s68jtu1tb3ecfcobpor23, O_RDWR) failed: Permission denied (13) in C:\inetpub\vhost\httpdocs\admin\lib\lang.php on line 2
[02-Dec-2011 11:16:43] PHP Warning:  Unknown: open(C:\Windows\temp\sess_5dvl2s68jtu1tb3ecfcobpor23, O_RDWR) failed: Permission denied (13) in Unknown on line 0
[02-Dec-2011 11:16:43] PHP Warning:  Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\Windows\temp) in Unknown on line 0

Best Answer

Does the account that IIS is running under (IUSER_INETPUB or whatever it is) have write permissions on C:\Windows\Temp?

It may either not have permission to access anything in C:\Windows, or be explicitly denied any rights. You may want to create another directory elsewhere (C:\PHPSessions, maybe) and explicitly grant read/write (but NOT execute) permissions to the IIS account on that directory.

Related Topic