• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Error with Xcache after upgrade to 1.4.5

gavpeds

Active member
#1
I Think this is to do with xcache considering the error but not sure how to fix.

ErrorException: Fatal Error: xcache_count(): xcache.admin.user and/or xcache.admin.pass settings is not configured. Make sure you've modified the correct php ini file for your php used in webserver. -library/Zend/Cache/Backend/Xcache.php:186
I only started getting this error after updgrade and have not changed the php.ini file. Was working fine in 1.4.4

This is what i have in the library/config.php file
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
$config['cache']['backend']='Xcache';
Any ideas?
 
Last edited:

gavpeds

Active member
#2
Ok Digging round in library/Zend/Cache/Backend/Xcache.php:186

Should i be changing the things in red now?

// Necessary because xcache_clear_cache() need basic authentification
$backup = array();
if (isset($_SERVER['PHP_AUTH_USER'])) {
$backup['PHP_AUTH_USER'] = $_SERVER['PHP_AUTH_USER'];
}
if (isset($_SERVER['PHP_AUTH_PW'])) {
$backup['PHP_AUTH_PW'] = $_SERVER['PHP_AUTH_PW'];
}
if ($this->_options['user']) {
$_SERVER['PHP_AUTH_USER'] = $this->_options['user'];
}
if ($this->_options['password']) {
$_SERVER['PHP_AUTH_PW'] = $this->_options['password'];


Although line 186 is this

$cnt = xcache_count(XC_TYPE_VAR);
for ($i=0; $i < $cnt; $i++) {
xcache_clear_cache(XC_TYPE_VAR, $i);
}
 
Last edited:

Sheratan

Well-known member
#4
You can find xcache.ini by create phpinfo file. Find in :Additional .ini files parsed"

if there is no xcache.ini, check your php.ini if there is any xcache configuration in there.