0

This is driving us all nuts.

We have an IIS web server running php using wincache.

In iis we have the document root and a second part of the website mapped using a virtual directory.

First, here is the error:

PHP Fatal error:  session_start(): Failed to initialize storage module: wincache (path: C:\Windows\Temp)

We got the error to duplicate in a simple 1 line php file:

<?php
session_start();
?>

Here's the kicker

This file throws NO errors if placed anywhere in the root doc folder. BUT once placed in the virtual directory it will work for about 5 min then fail. It will continue to fail until we restart IIS.

We also have 2 servers identically configured. It's working with no issues on of the 2 servers.

4

2 回答 2

0

不完全是我正在寻找的答案。但我们只花了几个小时切换到 Apache。错误消失了,服务器更快了,一切都很好。

于 2015-03-04T05:29:22.080 回答
0

听起来运行 PHP 的 IIS 应用程序池 ID 没有写入 C:\Windows\Temp 的权限。您应该检查文件夹上的 ACL,以查看它是否可以由您的应用程序池标识写入。

c:\Windows>icacls Temp
Temp NT AUTHORITY\SYSTEM:(OI)(CI)(S,RD)
     BUILTIN\IIS_IUSRS:(OI)(CI)(S,RD)
     BUILTIN\Users:(CI)(S,WD,AD,X)
     BUILTIN\Administrators:(F)
     BUILTIN\Administrators:(OI)(CI)(IO)(F)
     NT AUTHORITY\SYSTEM:(F)
     NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
     CREATOR OWNER:(OI)(CI)(IO)(F)

如果您在 ACL 上看不到 BUILTIN\IIS_IUSRS,则默认应用程序池 ID 无法写入该目录。如果您为应用程序池使用自定义用户 ID,则需要确保它位于文件夹的 ACL 上。

于 2015-06-04T22:10:27.213 回答