我花了很多时间来让 wincache 工作,因为我在 Symfony 2 中的应用程序在我的 Windows 8 上很慢(初始化时间 > 2 秒)。此处创建 Wincache 解决方案 https://stackoverflow.com/a/9487264
IIS 已安装并且在 phpinfo() 中。但问题是我的应用程序仍然很慢。我试着搜索出了什么问题,看起来 reroute.ini 根本没有加载,即使它在 php.ini 中也是如此
wincache.rerouteini="C:\Program Files (x86)\iis express\PHP\v5.5\reroute.ini"
但它在 phpinfo() 中缺失
我什至看了pecl上的源代码,我发现
#ifdef WINCACHE_TEST
/* index 21 */ STD_PHP_INI_ENTRY("wincache.rerouteini", NULL, PHP_INI_SYSTEM, OnUpdateString, rerouteini, zend_wincache_globals, wincache_globals)
/* index 22 */ STD_PHP_INI_ENTRY("wincache.olocaltest", "0", PHP_INI_SYSTEM, OnUpdateBool, olocaltest, zend_wincache_globals, wincache_globals)
#endif
那是什么?这意味着此选项仅在常量 WINCACHE_TEST 为真时才存在?因为从来没有,因为我也发现了这一点
#ifdef WINCACHE_DEBUG
# define WINCACHE_TEST
# define _ASSERT(x) if(!(x)) { dprintalways(#x); if(IsDebuggerPresent()) { DebugBreak(); } }
#else
# define _ASSERT(x)
#endif
并且常量 WINCACHE_DEBUG 在上面的代码中被注释掉了
/* comment following line for release builds */
/* #define WINCACHE_DEBUG */
/* #define DEBUG_DUMP_OPARRAY */
这是错误吗?我只想让 reroute.ini ( http://www.php.net/manual/en/wincache.reroutes.php) 工作。这是可以将初始化时间减少 4 倍的选项,请帮助解决我在那里的错误,或者在此处向我发送适用于 PHP5.5 VC11 NTS 版本的功能性 wincache 扩展,谢谢!
最佳答案
我有同样的问题,所以我在 WinCache 上问了 forums事实证明,重新路由功能已经被删除了一段时间,他们没有更新文档。太糟糕了。
关于php - Wincache 扩展无法在 IIS 上正常工作(它仍然很慢|,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23591406/