【问题标题】:I am trying to add a plugin in Joomla and it gives me a fatal error我正在尝试在 Joomla 中添加一个插件,但它给了我一个致命错误
【发布时间】:2012-06-02 11:41:06
【问题描述】:

致命错误:在 C:\xampp\htdocs\jsf\libraries\joomla\cache\storage\memcache.php 的第 435 行调用非对象的成员函数 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;
}

【问题讨论】:

  • 这是 Joomla 的节选!源代码,不是吗?由于问题几乎肯定是由您的插件间接引起的,因此我们需要知道您的插件在做什么才能为您提供帮助。
  • 我尝试安装的每个插件都会发生这种情况
  • 你的缓存应该在内存缓存中吗?您是否尝试过将其切换到文件?

标签: php joomla syntax-error


【解决方案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';

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

【讨论】:

    猜你喜欢
    • 2019-03-09
    • 1970-01-01
    • 2019-07-16
    • 1970-01-01
    • 1970-01-01
    • 2020-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多