[horde] Problem with XCache and Horde
Michael J Rubinsky
mrubinsk at horde.org
Tue Apr 28 13:26:19 UTC 2015
Quoting Jens Grüntjes <jens.gruentjes at ebira.de>:
> Hello,
>
> since I changed the PHP opcode cache from APC to XCache I'm running
> into problems with horde. Whenever horde-alarms is executed I
> receive an error message like:
>
> Cannot write Autoloader cache to backend
>
> Horde's log file then contains the following line:
>
> 2015-04-28T10:50:03+00:00 WARN: HORDE [horde] PHP ERROR:
> xcache_set(): XCache var cache was not initialized properly. Check
> php log for actual reason [pid 2603 on line 155 of
> "/usr/share/php/Horde/Autoloader/Cache/Bootstrap.php"]
>
> I can raise the error if I manually execute horde-alarms as well.
>
> As I wrote in a previous post to the imp-list (subject was: [imp]
> Cannot write Autoloader cache to backend.), I tried/checked
> different things to find out what the reason is.
>
> 1) The directory /tmp is writable for the webserver
>
> 2) XCache is activated according to the output of phpinfo() and to
> the XCache admin page of my server
>
> 3) I tried to use XCache from inside horde, i.e. the PHP console:
>
> $test = "Hello";
> xcache_set("test", $test);
>
> I see the variable test in XCache's admin-view with the value Hello.
> So it looks as if XCache is working from inside horde.
>
> 4) I tried using xcache from inside a website rather than from
> horde's console, and that works.
>
> 5) I put a log statement in
> /usr/share/php/Horde/Autoloader/Cache/Bootstrap.php like this:
>
> public function set($key, $data)
> {
> $data = ($this->_mask & self::MSGPACK)
> ? msgpack_pack($data)
> : json_encode($data);
>
> if ($this->_mask & self::LZ4) {
> $data = @horde_lz4_compress($data);
> } elseif ($this->_mask & self::LZF) {
> $data = lzf_compress($data);
> }
>
> if ($this->_mask & self::APC) {
> return apc_store($key, $data);
> } elseif ($this->_mask & self::XCACHE) {
> error_log($key, 4); // <---- Logging here
> error_log($data, 4); // <---- Logging here
> return xcache_set($key, $data);
> }
> ...
> }
>
> When I run horde-alarms from command line the message is triggered.
> I copied the output into a simple php-script:
My guess is that you have a different php.ini file for PHP CLI than
for cgi/apache_mod and you haven't configured xcache.var_size properly
in that file.
--
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5869 bytes
Desc: S/MIME Signature
URL: <http://lists.horde.org/archives/horde/attachments/20150428/2fca1d50/attachment.bin>
More information about the horde
mailing list