我试图在Joomla中添加一个插件,它给了我一个致命的错误

时间:2012-06-02 11:41:07

标签: php joomla syntax-error

致命错误:在第435行的C:\ xampp \ htdocs \ jsf \ libraries \ joomla \ cache \ storage \ memcache.php中的非对象上调用成员函数add()

protected function lockindex()
{
    $looptime = 300;
    $data_lock = self::$_db->add($this->_hash . '-index_lock', 1, false, 30);

    if ($data_lock === false)
    {

        $lock_counter = 0;

        // Loop until you find that the lock has been released.  that implies that data get from other thread has finished
        while ($data_lock === false)
        {
            if ($lock_counter > $looptime)
            {
                return false;
                break;
            }

            usleep(100);
            $data_lock = self::$_db->add($this->_hash . '-index_lock', 1, false, 30);
            $lock_counter++;
        }
    }

    return true;
}

1 个答案:

答案 0 :(得分:1)

转到configuration.php并更改为此设置。

public $caching = '0';
public $cache_handler = 'file';
public $cachetime = '15';

而不是: -

public $caching = '0';
public $cache_handler = 'memcache';
public $cachetime = '30';
public $memcache_persist = '1';
public $memcache_compress = '0';
public $memcache_server_host = 'mem';
public $memcache_server_port = '11211';

这将通过手动将其切换到文件来修复致命的崩溃错误。