PHP +装甲运兵车Zend:找不到类
我无法让 APC 与我的 Zend+Doctrine 应用程序一起正常工作。当我打开 APC 时,出现错误:
致命错误:访问未声明的静态属性:/var/www/libs/Zend/Loader/Autoloader.php 第 92 行中的 Zend_Loader_Autoloader::$_instance
我见过很多人抱怨这一点,但似乎没有人解决他们的问题问题,除了这个人:访问未声明的静态属性:Doctrine\ODM\MongoDB\ Mapping\Driver\AnnotationDriver::
我尝试了这种方法,将 APC 从 3.1.3 升级到 3.1.9。这对我不起作用。 我尝试启用 ninclude_once_override:
apc.include_once_override = 1
也不起作用。
我还尝试通过将以下行添加到 apc.ini 来让 APC 不缓存 Zend_Loader_Autoloader:
apc.filters = Autoloader.php
它解决了主要问题,但引发了另一个问题:
警告:call_user_func() 期望参数 1 为有效回调,在 /var/www/libs/Zend/Loader/Autoloader.php 第 472 行中找不到类 'Zend_Loader' 警告:call_user_func() 期望参数 1 为是一个有效的回调,在线 /var/www/libs/Zend/Loader/Autoloader.php 中找不到类“Zend_Loader” 472 致命错误:在 /var/www/libs/Doctrine/Record.php 第 801 行中找不到类“Doctrine_Event”
接下来我做的是让 APC 不缓存 Zend_Loader
apc.filters = Autoloader.php,Loader.php
解决了上面的问题,但是找不到其他类:
致命错误:在 /var/www/libs/Zend/Loader.php 第 99 行中找不到类“Zend_Exception”
我让 APC 不缓存 Zend_Exception,但找不到其他类。
请注意,错误仅在清除缓存后第二次加载页面时发生。第一页加载就像一个魅力。
有人遇到过类似的问题并能够解决吗?
非常感谢。
I can't get APC to work properly with my Zend+Doctrine application. When I turn APC on I get the error:
Fatal error: Access to undeclared static property: Zend_Loader_Autoloader::$_instance in /var/www/libs/Zend/Loader/Autoloader.php on line 92
I've seen lots of people complaining about that but no one seem to have solved their problem, except by this guy: Access to undeclared static property: Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver::
I tried that aproach, upgrading APC from 3.1.3 to 3.1.9. It didn't work for me.
I tried enabling nclude_once_override:
apc.include_once_override = 1
Didn't work either.
I also tried to get APC not to cache Zend_Loader_Autoloader by addint the following line to apc.ini:
apc.filters = Autoloader.php
It solved the primary problem, but caused another one:
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Zend_Loader' not found in /var/www/libs/Zend/Loader/Autoloader.php on line 472 Warning: call_user_func() expects parameter 1 to be a valid callback, class 'Zend_Loader' not found in /var/www/libs/Zend/Loader/Autoloader.php on line 472 Fatal error: Class 'Doctrine_Event' not found in /var/www/libs/Doctrine/Record.php on line 801
Next thing I did was get APC not to cache Zend_Loader
apc.filters = Autoloader.php,Loader.php
Solves the problem above, but other classes can't be found:
Fatal error: Class 'Zend_Exception' not found in /var/www/libs/Zend/Loader.php on line 99
I got APC not to cache Zend_Exception, but other classes won't be found.
Note that the errors occur only from the 2nd time the page loads on, after the cache is cleared. First page load works like a charm.
Anyone faced a similar problem and was able to solve it?
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要
session_write_close()
:You need
session_write_close()
: