0

我们正在寻找出现以下 500 错误的情况:

File xyz.php does not exist or class "xyz" was not found in the file at () in SF_ROOT_DIR/lib/vendor/Zend/Loader.php line 107 ...

其中 xyz ==

Memcache(尝试在命令行上使用 symfony cc 时)

或者

sfDoctrineAdminGenerator(使用老式 AdminGenerator 生成的 CMS 页面时)。

我们使用 Propel,但 Loader.php 试图加载仅用于 Doctrine 的类。

目前我正在使用一个肮脏的黑客,我请求 Loader.php 检查文件是否是这两种情况中的任何一种,如果是,则简单地返回而不是尝试加载它。显然,从长远来看,这是不可接受的。

有没有人遇到过这个,你是怎么解决的?

编辑添加:

我们有:

class ProjectConfiguration extends sfProjectConfiguration
{
  public function setup()
  {
    // for compatibility / remove and enable only the plugins you want
    $this->enableAllPluginsExcept(array('sfDoctrinePlugin'));
  }
}

我们在顶级配置目录中有一个 propel.ini 文件。这只是在过去四个星期左右才开始,我们已经有一年多的稳定构建了。我很确定教义完全被禁用了。

4

3 回答 3

0

这可能是 Symfony 的自动加载器和 Zend 的自动加载器之间的冲突吗?尝试将以下内容添加到您的 ProjectConfiguration.class.php:

set_include_path(sfConfig::get('sf_lib_dir') . '/vendor' . PATH_SEPARATOR . get_include_path());
require_once sfConfig::get('sf_lib_dir').'/vendor/Zend/Loader/Autoloader.php';
$loader = Zend_Loader_Autoloader::getInstance();

我使用上面的 Zend Lucene 并且它有效。如果这没有帮助,也许这些Zend 和 Symfony 幻灯片中的某些内容可能会有所帮助。

于 2009-11-20T00:20:19.137 回答
0

我唯一能想到的就是确保在您的项目配置中禁用 Doctrine ...

于 2009-11-19T18:48:04.020 回答
0

清除缓存 :) 并确保您的 index.php 具有正确的包含文件。

于 2009-12-21T09:01:05.593 回答