Pregunta

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

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

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

but its missing in phpinfo()

enter image description here

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

#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

#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

/* 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!

¿Fue útil?

Solución

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.

Otros consejos

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

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.

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

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

  • file_exists
  • file_get_contents
  • filesize
  • readfile
  • is_writable
  • is_writeable (alias for 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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top