Wincache擴展無法正常使用IIS(它仍然很慢|

[英]Wincache extension is not working on IIS properly (its still slow|


i have spend many many hours to get wincache work, because my app in Symfony 2 is slow on my Windows 8 (initialisation time > 2s). Wincache solution founded here https://stackoverflow.com/a/9487264

我花了很多時間才能讓wincache工作,因為我的Windows 8中的應用程序在我的Windows 8上很慢(初始化時間> 2s)。 Wincache解決方案在這里成立https://stackoverflow.com/a/9487264

IIS is installed and its in phpinfo(). But problem is that my application is still slow. I have tried to search what is wrong, and it looks like reroute.ini is not loaded at al, even if its in php.ini

安裝了IIS並將其安裝在phpinfo()中。但問題是我的申請仍然很慢。我試圖搜索出錯了,看起來reroute.ini沒有加載到al,即使它在php.ini中也是如此

wincache.rerouteini="C:\Program Files (x86)\iis express\PHP\v5.5\reroute.ini"

but its missing in phpinfo()

但它在phpinfo()中缺失

enter image description here

I even looked at the source code on pecl, and i found

我甚至查看了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

Whats that? It means that this option is present only when constant WINCACHE_TEST is true? Because thats never, because i found this too

那是什么?這意味着只有當常量WINCACHE_TEST為真時才會出現此選項?因為那從來沒有,因為我也發現了這一點

#ifdef WINCACHE_DEBUG
# define WINCACHE_TEST
# define _ASSERT(x)   if(!(x)) { dprintalways(#x); if(IsDebuggerPresent()) { DebugBreak(); } }
#else
# define _ASSERT(x)
#endif

And constant WINCACHE_DEBUG is commented out above in code

並且常量WINCACHE_DEBUG在代碼中被注釋掉

/* comment following line for release builds */
/* #define WINCACHE_DEBUG */
/* #define DEBUG_DUMP_OPARRAY */

Is this bug? I just want to get reroute.ini (http://www.php.net/manual/en/wincache.reroutes.php) work. Thats option that can decrease initialisation time 4x, please help what i have wrong there, or send me functional wincache extension here for PHP5.5 VC11 NTS version, thx!

這個錯誤嗎?我只想得到reroute.ini(http://www.php.net/manual/en/wincache.reroutes.php)的工作。這可以減少初始化時間4x的選項,請幫助我在那里做錯了,或者在這里發送功能wincache擴展為PHP5.5 VC11 NTS版本,thx!

2 个解决方案

#1


1  

I had the same problem, so I asked on the WinCache forums and it turns out the function reroute function has been removed for a while, without them updating the documentation. Too bad.

我有同樣的問題,所以我在WinCache論壇上詢問,事實證明函數重新路由功能已被刪除了一段時間,沒有他們更新文檔。太糟糕了。

#2


0  

Yes, the wincache.rerouteini setting was disabled very early on for app compat reasons.

是的,wincache.rerouteini設置很早就因app appat原因而被禁用。

However, in WinCache 1.3.7.1 a new form of reroute support has been added. It no longer takes a separate .ini file. Reroutes are on by default.

但是,在WinCache 1.3.7.1中添加了一種新形式的重新路由支持。它不再需要單獨的.ini文件。重新啟動默認情況下處於啟用狀態。

php 5.4: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.4-nts-vc9-x86.exe/download php 5.5: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.5-nts-vc11-x86.exe/download php 5.6: http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.6-nts-vc11-x86.exe/download

php 5.4:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1-dev-5.4-nts-vc9-x86.exe/download php 5.5:http://sourceforge.net/projects /wincache/files/development/wincache-1.3.7.1-dev-5.5-nts-vc11-x86.exe/download php 5.6:http://sourceforge.net/projects/wincache/files/development/wincache-1.3.7.1 -dev-5.6-NTS-VC11-x86.exe程序/下載

This private wraps 10 PHP functions which can benefit from looking in the WinCache file cache first. The functions are:

這個私有包裝了10個PHP函數,這些函數可以從首先查看WinCache文件緩存中受益。功能是:

  • file_exists
  • file_get_contents
  • filesize
  • readfile
  • is_writable
  • is_writeable (alias for is_writable)
  • is_writeable(is_writable的別名)

  • is_readable
  • is_file
  • is_dir
  • realpath

Reroute/detour is on by default. If you do need to turn it off:

默認情況下,重新路由/繞行是打開的。如果您確實需要將其關閉:

wincache.reroute_enabled=0


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2014/05/11/724e0bdb5436e792d81644812fe843f0.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com