使用 Drupal 配置 APC
我正在开发一个托管在安装了 CENTOS 5.4 i686 virtuozzo 的 VPS 上的网站。我在服务器上安装了 drupal,它同时获得了大约 100 个经过身份验证的用户。但是在某个时间点,服务器停止响应并且站点离线。因此,我尝试安装操作码缓存 - 替代 PHP 缓存。
虽然服务器的其余部分工作正常,但一旦我安装 PECL APC,Drupal 安装就会崩溃,并显示以下消息 致命错误:无法将此文件中的代码与 /home/apogee/public_html/2010/themes/zen/zen/block.tpl.php 中的非编码文件一起运行。
您能告诉我一种正确配置 Drupal 以使用 APC 的方法吗?
谢谢
尼宁
I am working on a website which is hosted on a VPS with CENTOS 5.4 i686 virtuozzo installed. I have a drupal installation on the server which gets around 100s of authenticated users at the same time.But at a certain point of time the server stopped responding and the site went offline. So, I tried installing the opcode cache - Alternative PHP Cache.
While the rest parts of the server work fine, the Drupal installation crashes as soon as I install PECL APC with the following message
Fatal error:Cannot run code from this file in conjunction with non encoded files in /home/apogee/public_html/2010/themes/zen/zen/block.tpl.php.
Could you please tell me a way to properly configure Drupal to use APC ?
Thanks
niting
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为该错误来自 Zend Encoder...如果您不需要安装它,请卸载它,看看是否可以解决问题。如果您确实需要它(闭源模块?),那么不确定它和 APC 是否可以很好地协同工作......
I think the error comes from Zend Encoder...if you don't need it installed then uninstall it and see if that fixes things. If you do need it (closed-source module?), then not sure if that and APC can play nicely together...
上禁用 APC
您必须在 php.ini apc.enabled=0
APC 和 Zend Optimizer 不能一起工作
you must be disable APC on php.ini
apc.enabled=0
APC and Zend Optimizer can't work with together
四间厨房的 David Strauss 做了一些工作,让 Pressflow(性能调整的 Drupal 发行版)与 APC 良好配合 https://wiki.fourkitchens.com/display/PF/Tuning+APC。
有了如此多的并发使用,可能值得您花时间研究一下压力流。
David Strauss at four kitchens has done some work on getting Pressflow (Performance tuned Drupal distribution) to work well with APC https://wiki.fourkitchens.com/display/PF/Tuning+APC.
With that much concurrent usage it may be worth your while to look into pressflow.
我有几个使用 APC 的网站,但我从未见过这种错误——即使是基于 Drupal 的网站也是如此。
经过一番搜索,它似乎与 Zend Optimizer 和/或 Encoder 有关(请参阅此线程,例如),而不是 Drupal 本身。
我想您应该使用 Zend 产品或 APC,但不能同时使用两者。
I have a couple of websites using APC and I've never seen that kind of error -- even with the Drupal-based ones.
After a bit of searching, it seems related to Zend Optimizer and/or Encoder (see the last answer on this thread, for instance), and not to Drupal itself.
I suppose you should use either Zend products, or APC, but not a combinaison of both.