Reputation: 1757
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()
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!
Upvotes: 4
Views: 2564
Reputation: 396
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:
Reroute/detour is on by default. If you do need to turn it off:
wincache.reroute_enabled=0
Upvotes: 0