Magento的APC更改会停止SimplePie的工作

Magento的APC更改会停止SimplePie的工作,magento,apc,simplepie,Magento,Apc,Simplepie,几个月来,我们一直在Magento安装中使用SimplePie将我们的博客帖子毫无问题地拉到我们的主页上。由于Magento的其他一些问题,我们让web主机在APC中关闭操作码。完成此操作后,SimplePie的下一次每小时更新停止加载主页,并在Apache中返回以下错误: [Wed Jan 18 09:59:57 2012][error]PHP致命错误:在第738行的{server root}/lib/SimplePie/SimplePie.inc中未找到类“Zend_Log” 我有点不知所措

几个月来,我们一直在Magento安装中使用SimplePie将我们的博客帖子毫无问题地拉到我们的主页上。由于Magento的其他一些问题,我们让web主机在APC中关闭操作码。完成此操作后,SimplePie的下一次每小时更新停止加载主页,并在Apache中返回以下错误:

[Wed Jan 18 09:59:57 2012][error]PHP致命错误:在第738行的{server root}/lib/SimplePie/SimplePie.inc中未找到类“Zend_Log”

我有点不知所措,不知道发生了什么,也不知道该怎么解决。SimplePie是作为横幅/小部件交付的,因此如果我将它放在不同的类别页面上,我会得到相同的结果。(页面停留在SimplePie命令处)我希望这是一件简单的事情,比如更改将迫使旧的chached RSS保留,并且无法修改,但我不确定

任何帮助都将不胜感激!
SimplePie的代码是不变的,版本为1.2.1。我有一个页面/app/design/frontend/default/default/template/page/html/blog.phtml,其中包含以下代码

<div class="col-narrow right sidebar-blog">
<h2>Our Gardening Blog</h2>

<?php

// Make sure SimplePie is included. You may need to change this to match the location of

require_once('lib/SimplePie/simplepie.inc');

// We'll process this feed with all of the default options.
$feed = new SimplePie();

// Set which feed to process.
$feed->set_feed_url('http://blog.americanmeadows.com/feed/');

// Run SimplePie.
$feed->init();

// This makes sure that the content is sent to the browser as text/html and the UTF-8 
$feed->handle_content_type();

    /*
    Here, we'll loop through all of the items in the feed, and $item represents the 
current item in the loop.
    */
    foreach ($feed->get_items(0,2) as $rss_item):
    ?>

<div class="article-teaser">
<p><span><?php echo $rss_item->get_date('F j, Y'); ?></span></p>
<h2 class="article-title"><a href="<?php echo $rss_item->get_permalink(); ?>"><?php echo $rss_item->get_title(); ?></a></h2>

<?php   if ($rss_item->get_item_tags('', 'thumbnail')) {$thumbnail = $rss_item->get_item_tags('', 'thumbnail'); echo "<img src='" . $thumbnail[0]['data'] . "'>";  } ?>
<p><?php echo $rss_item->get_description(); ?> <a class="more" href="<?php echo $rss_item->get_permalink(); ?>" target="_blank">Continue Reading</a></p>
</div>

<?php endforeach; ?>

</div>
我在主页的左栏小部件中包含该横幅,以便显示它

SimplePie中的行正在抛出错误

    function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null)
{
    // Other objects, instances created here so we can set options on them
    $this->sanitize =& new SimplePie_Sanitize; /* Error is thrown here */

    // Set options if they're passed to the constructor
    if ($cache_location !== null)
    {
        $this->set_cache_location($cache_location);
    }

我认为这是你所需要的,但我很高兴发布更多

我唯一的想法是,在某个地方,有什么东西将
Zend_Log
设置为错误记录器。检查代码中是否有
set\u error\u handler()。(您可以通过使用
trigger\u error()
自己引发一个错误并查看发生了什么情况来再次检查这一点。)


至于发生错误的原因,我想冒险猜测一下,这是因为您在PHP4中使用了1.2.1,这将在通过引用分配新的时(例如在那一行)产生
E_DEPRECATED
错误。

我唯一的想法是,在某个地方有什么东西将
Zend_Log
设置为错误记录器。检查代码中是否有
set\u error\u handler()。(您可以通过使用
trigger\u error()
自己引发一个错误并查看发生了什么情况来再次检查这一点。)


至于发生错误的原因,我想冒险猜测一下,这是因为您在PHP4中使用的是1.2.1,这将在通过引用(例如在该行)分配新的时产生
E_DEPRECATED
错误。

您能发布相关的源代码吗?SimplePie不使用任何Zend组件,因此您的版本必须是自定义版本。我刚刚检查了SimplePie.inc,它是1.2.1的开发版本。我刚刚将其更新到当前版本,但得到了相同的结果。我将在主要问题中添加我是如何进行交付的。SimplePie中唯一的问题是
SimplePie\u Sanitize
的实例化,因此这一定来自其他地方。(另外,1.2.1已经发布,所以1.2.1-dev已经过时)您可以发布相关的源代码吗?SimplePie不使用任何Zend组件,因此您的版本必须是自定义版本。我刚刚检查了SimplePie.inc,它是1.2.1的开发版本。我刚刚将其更新到当前版本,但得到了相同的结果。我将在主要问题中添加我是如何进行交付的。SimplePie中唯一的问题是
SimplePie\u Sanitize
的实例化,因此这一定来自其他地方。(另外,1.2.1已经发布,所以1.2.1-dev已经过时)所以这里有一件非常奇怪的事情。如果将trigger_error()添加到加载的blogs.phtml页面,则既不会创建错误,也不会引发代码问题。PHP的版本是5.3.8,但它确实指向一个设置问题,而不是您的代码。谢谢你把心思放在这上面!删除它是否会再次产生相同的问题?这可能仅仅是一次操作码缓存的刷新,在这方面有所帮助。(可能你的主机做了一些奇怪的事情,它仍然在加载缓存)是的,删除它会再次导致同样的问题。如果我的主机关闭了操作码而没有刷新缓存,我不会感到惊讶。请与您的主机仔细检查,看看他们是否能在配置中找到任何错误。将
trigger_error()
替换为类似
echo''只是为了确保操作码已更改,并查看是否仍然发生。另外,在执行
新建SimplePie()
之前,尝试添加一个
还原错误处理程序()
,看看这是否有帮助。如果将trigger_error()添加到加载的blogs.phtml页面,则既不会创建错误,也不会引发代码问题。PHP的版本是5.3.8,但它确实指向一个设置问题,而不是您的代码。谢谢你把心思放在这上面!删除它是否会再次产生相同的问题?这可能仅仅是一次操作码缓存的刷新,在这方面有所帮助。(可能你的主机做了一些奇怪的事情,它仍然在加载缓存)是的,删除它会再次导致同样的问题。如果我的主机关闭了操作码而没有刷新缓存,我不会感到惊讶。请与您的主机仔细检查,看看他们是否能在配置中找到任何错误。将
trigger_error()
替换为类似
echo''只是为了确保操作码已更改,并查看是否仍然发生。另外,在执行
新建SimplePie()
之前,尝试添加一个
还原错误处理程序()
,看看这是否有帮助。
    function SimplePie($feed_url = null, $cache_location = null, $cache_duration = null)
{
    // Other objects, instances created here so we can set options on them
    $this->sanitize =& new SimplePie_Sanitize; /* Error is thrown here */

    // Set options if they're passed to the constructor
    if ($cache_location !== null)
    {
        $this->set_cache_location($cache_location);
    }