|Version 12 (modified by moo, 6 years ago) (diff)|
Frequently Asked Questions
- Where to get help?
- Why XCache?
- Where Is ./configure?
- How to install from source?
- What if i'm getting "undefined symbol"
- Apache2 keeps getting segmentation faults with cache larger than 4M
- I get "Cannot dynamically load xcache.so"
- There's misses > 0 no matter how I increase the shm size, why?
- I see jumpy "hits" in admin page
- I get error about "XCache requires Zend Engine API version NNN"
Frequently Asked Questions
Where to get help?
- XCache Forum.
Where Is ./configure?
Well... you have to install php first, which gives you "phpize" executable(script), and do
~/src/xcache $ phpize (generating configure) ~/src/xcache $ ./configure --help ~/src/xcache $ ./configure --enable-...
How to install from source?
What if i'm getting "undefined symbol"
If your php is configured --enable-versioning, disable it. It's broken. If you insist on versioning, build XCache as a static module of php.
Apache2 keeps getting segmentation faults with cache larger than 4M
Set "xcache.readonly_protection = On" in php.ini
I get "Cannot dynamically load xcache.so"
When u get PHP Warning: Unknown(): Cannot dynamically load xcache.so - dynamic modules are not supported in Unknown on line 0, it's because your php is running on a arch/os that don't support dynamic load library(aka modules), to solve it:
~ $ mv xcache php-src/ ~ $ cd php-src/ ~/php-src $ ./buildconf --force ~/php-src $ ./config.nice --enable-xcache --enable-xcache-coverager (or if you havn't run configure yet, use:) ~/php-src $ ./configure --enable-xcache --enable-xcache-coverager --your-options ~/php-src $ make all ~/php-src $ make install
There's misses > 0 no matter how I increase the shm size, why?
"Misses" a opp to "hits". You get cache misses when there's nothing in the cache in the first time, after when it is cached and you starts getting cache hits. So there shall be at least misses=count(cached-php).
I see jumpy "hits" in admin page
It is possible that u see jumpy "hits" count in admin page. i.e.: you see hits=300,000 on first load of admin page, but dropped to hits=1 in 2nd reload and back to hits=312,456 on 3rd load.
This is because you have php started in different group which does not share shm with each other. But keep in mind that all childs in 1 group will share shm. So how to check and make it 1 group only?
$ pstree -p | |-supervise(4913)---lighttpd(23975)-+-php-cgi(23979)-+-php-cgi(23981) | | | |-php-cgi(23982) | | | |-php-cgi(23983) | | | `-php-cgi(23984)
$ pstree -p | |-supervise(4913)---lighttpd(23975)-+-php-cgi(23979)-+-php-cgi(23981) | | | |-php-cgi(23982) | | | |-php-cgi(23983) | | | `-php-cgi(23984) | +-php-cgi(23980)-+-php-cgi(23985) | | | |-php-cgi(23986) | | | |-php-cgi(23987) | | | `-php-cgi(23988)
I get error about "XCache requires Zend Engine API version NNN"
XCache requires Zend Engine API version 220051025. The Zend Engine API version 220060519 which is installed, is newer. Contact mOo at http://xcache.lighttpd.net for a later version of XCache.
You get this error because you have an outdated build of XCache. i.e., you have upgraded php and the old xcache module will not work with it. Just rebuild XCache, make sure you're using the correct phpize/php-config.
$ /usr/local/bin/phpize $ ./configure --enable-xcache --with-php-config=/usr/local/bin/php-config
Replace /usr/local/ with your own $prefix of php installtion