37
I Use This!
Activity Not Available

News

Analyzed 3 months ago. based on code collected 4 months ago.
Posted about 8 years ago by jfk01
My setup is this virtual hosting server: Debian 7.11, Linux s4web.ehosting.cz 3.2.0-4-amd64 #1 SMP Debian 3.2.88-1 x86_64 GNU/Linux Apache 2.2.22-13+deb7u8 PHP 5.6.28 running in FPM mode with UID/GID, open_basedir and chroot separation for ... [More] virtual domains. Xcache 4.0.0 compiled on Debian 7.11, Linux web 2.6.32-48-pve #1 SMP Fri Dec 23 10:22:54 CET 2016 x86_64 GNU/Linux, gcc version 4.7.2 (Debian 4.7.2-5). The best thing about Xcache is that identical php files are cached in memory only once even though they reside in different virtual domains. It's saving memory when many clients have similar WordPress? or Joomla installations. A client called that his domain stopped working, claiming he didn't change anything. Looking briefly at the error showed that the script wants to include non existing file (perhaps misspelled path). I told the client that it's his problem and probably forget to change something in the configuration. But when the same scenario repeated on a different server, I started to investigate the situation. The problem was always in composer's autoload_real.php on line 66 trying to include file from different virtual domain thus breaking the open_basedir restriction. I didn't change anything on the setup neither but the time it stopped working I just restarted the PHP process. It led to a situation when domain A was working and domain B showing an error (trying to include utf8.php from domain's A path) and just after another PHP restart domain B started to work and domain A showed and error (trying to include utf8.php from domain's B path). Long story short, the file autoload_real.php was identical in both domains A and B and the one that loaded first into Xcache kept it's DIR. It only happens when the variable is static and the source files are identical. PHP version is not important, tested on PHP 5.4, 5.5 and 5.6 with same results which led me to the conclusion it must be Xcache issue. Also switching from Xcache to APC or Opcache resolved the issue. So the minimal test configuration to reproduce the error is 4 php files: testmain1.php: require_once 'testinclude1.php'; var_dump($myfilename); testinclude1.php: static $myfilename=__FILE__; testmain2.php: require_once 'testinclude2.php'; var_dump($myfilename); testinclude2.php: static $myfilename=__FILE__; After browsing to testmain1.php and then to testmain2.php i got string(41) "/var/www/tst56/testcache/testinclude1.php" and string(41) "/var/www/tst56/testcache/testinclude1.php" while the expected results are string(41) "/var/www/tst56/testcache/testinclude1.php" and string(41) "/var/www/tst56/testcache/testinclude2.php" Setting xcache.cacher = Off also resolves the issue. The content of xcache.ini is: [xcache-common] extension = xcache.so [xcache.admin] xcache.admin.enable_auth = On xcache.admin.user = "admin" xcache.admin.pass = "..." [xcache] xcache.shm_scheme = "mmap" xcache.size = 92M xcache.count = 1 xcache.slots = 8K xcache.ttl = 7200 xcache.gc_interval = 300 xcache.var_size = 0M xcache.var_count = 1 xcache.var_slots = 8K xcache.var_ttl = 0 xcache.var_maxttl = 0 xcache.var_gc_interval = 300 xcache.test = Off xcache.readonly_protection = Off xcache.mmap_path = "/dev/zero" xcache.coredump_directory = "" xcache.cacher = On xcache.stat = On xcache.optimizer = On [xcache.coverager] xcache.coverager = Off xcache.coveragedump_directory = "" Well, the feature I liked most about Xcache is now probably the reason I must stop using it... --Jiri [Less]
Posted over 8 years ago by evgeniy.petrov
duplicate: Duplicate for #348
Posted over 8 years ago by evgeniy.petrov
Hello, I'm getting wrong results due to caching opcode of the same files where FILE or DIR present in static property of class. Steps to reproduce: Create 2 files with the same content: Run first then second file. The same result returned. Seems to be related to this feature ​https://xcache.lighttpd.net/wiki/AutoHardLinking
Posted over 8 years ago by grouponm
Is there a documentation to install XCache on php compiled with LiteSpeed? SAPI?
Posted over 8 years ago by moo
invalid: Sorry, i don't even know what WHM is. you may want to ask XCache google groups for help XCache doesn't depends on webserver, but it does depends on PHP/sapi. suppose you use php-cgi(fastcgi) mode, one should just use "phpize && ... [More] ./configure --enable-xcache && make all install". then copy admin/*.php to your htdocs folder [Less]
Posted over 8 years ago by grouponm
Hi, Installed XCache via WHM and copied out xcache folder in www But cannot copy, edit or rename any files in xcache folder. How do I get my admin interface up and complete installation. Appreciate help. Thank you.
Posted about 9 years ago by trurl
fixed: Replying to moo: make sure you have gnu awk installed. other awk might works but it seems yours doesn't Big thanx! Has added flex, bison and gawk. And it's solve problem. Better to add this pre-requirements into wiki.
Posted about 9 years ago by trurl
Can't compile version 3.2.0 (​https://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz) with php-5.6.20 (​http://php.net/get/php-5.6.20.tar.xz/from/this/mirror) Doing all as wiki:BuildingFromSource , but *make* failed with AUTOCHECK ... [More] ERROR: ==== store zend_op_array ================= AUTOCHECK ERROR: ==== restore zend_op_array ================= AUTOCHECK ERROR: ==== dprint zend_op_array ================= AUTOCHECK ERROR: ==== dasm zend_op_array ================= build based on official ​https://hub.docker.com/_/php/ 5.6.20-fpm-alpine with ​svn://svn.lighttpd.net/xcache/trunk same error [Less]
Posted over 9 years ago by paladox
Hi please add support for php7 since php7 is 2x faster and uses less bandwidth.
Posted over 9 years ago by drakmor
Bug of constant recognition. Test code: <?php trait ta { public function fn() { echo __CLASS__; } } xcache: class ta array(0) { } function fn 7 0 FETCH_CONSTANT t@0 l#0 NULL ... [More] 0x10 7 1 ECHO l#0 t@0 l#0 0x0 8 2 RETURN l#0 NULL l#0 0x0 4 0 NOP l#0 l#0 l#0 0x0 11 1 RETURN l#0 1 l#0 0x4 vld: Finding entry points Branch analysis from position: 0 Jump found. Position 1 = -2 filename: /home/test/trait.php function name: (null) number of ops: 2 compiled vars: none line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 4 0 E > NOP 11 1 > RETURN 1 branch: # 0; line: 4- 11; sop: 0; eop: 1; out1: -2 path #1: 0, Class ta: Function fn: Finding entry points Branch analysis from position: 0 Jump found. Position 1 = -2 filename: /home/test/trait.php function name: fn number of ops: 3 compiled vars: none line #* E I O op fetch ext return operands ------------------------------------------------------------------------------------- 7 0 E > FETCH_CONSTANT ~0 <const:'__CLASS__'> 1 ECHO ~0 8 2 > RETURN null branch: # 0; line: 7- 8; sop: 0; eop: 2; out1: -2 path #1: 0, End of function fn End of class ta. [Less]