0

当打开一个页面时,可能会得到一个错误信息,它甚至是现在。

其他人有这个问题或对如何解决这个问题或从哪里开始寻找有任何想法?

/**
 * Retrieve application root absolute path
 *
 * @param string $type
 * @return string
 */
public static function getBaseDir($type = \'base\')
{
    return self::getConfig()->getOptions()->getDir($type);  // Line 296
}
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 99 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 115 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 115 
Warning: array_keys() expects parameter 1 to be array, null given in /var/www/html/magento/lib/Varien/Object.php on line 115 
Warning: array_intersect(): Argument #1 is not an array in /var/www/html/magento/lib/Varien/Object.php on line 115 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 146 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 65 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 66 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 67 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 68 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 69 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 70 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/App.php on line 1315 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/App.php on line 813 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81 
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84 
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config.php on line 224 
Fatal error: Call to a member function getDir() on a non-object in /var/www/html/magento/app/Mage.php on line 296
4

3 回答 3

2

我早些时候在我的博客上发布了一个完整的演练,但是在努力寻找这个之后,我想我也会在这里发布解决方案。

问题是影响版本高达 5.3.3 ( https://bugs.php.net/bug.php?id=50027 ) 的 PHP 错误。该错误与垃圾收集问题有关,该问题与能够访问配置选项对象上的属性有关。这就是为什么有些人在增加内存限制后会看到差异的原因 - 它会影响垃圾收集发生的时间。

结果是在 app/code/core/Mage/Core/Model/Config/Options.php 中的 _construct() 中,即使 $this 是一个有效对象,任何读取 $this 任何属性的尝试都会报告错误$this 是一个非对象。

因此,唯一可靠的修复是将 PHP 升级到高于 5.3.3 的版本

于 2013-04-17T19:48:39.573 回答
0

我有完全一样的问题!你有能力解决它吗?

在 php.ini 中增加内存工作了一段时间,但错误又回来了。

在这里查看更多信息: http: //www.magentocommerce.com/boards/viewthread/43941/P15/

问候

于 2013-03-18T20:49:27.220 回答
0

尝试查看 php.ini 文件中的内存设置。这应该是 512M 或更高。默认情况下,它可能是 128M。

还要查看 cron 在服务器上运行的频率。

还要查看与 DB 的最大用户连接数。

对于 Magento,您可能希望在 php.ini 文件中包含 L max_connections = 500 之类的内容。

我过去也遇到过同样的问题,看起来将 cron 作业的频率重置回 Magento 默认值已经为我们修复了。

代码当然没有错。它本质上是 php.ini 配置或服务器配置。

于 2013-03-19T10:00:30.500 回答