Xcache var_size 错误

发布于 2024-09-04 10:49:28 字数 1341 浏览 13 评论 0原文

我正在尝试将 xcache 与 zend 框架结合使用来缓存 Zend_Db_Table_Abstract 中的元数据,以便每个表仅调用一次描述查询。在我的引导程序中实现 xcache 并运行应用程序时,出现以下错误:

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /home/randall/htdocs/lib/Zend/Cache/Backend/Xcache.php on line 95.

我已经调整了 php.ini 中的设置:

; XCACHE
 626 [xcache-common]
 627 zend_extension=/usr/lib/php5/20060613/xcache.so
 628 
 629 [xcache-admin]
 630 xcache.admin.enable_auth = On
 631 xcache.admin.user = "user"
 632 xcache.admin.password = "********"
 633 
 634 [xcache]
 635 xcache.shm.scheme = "mmap"
 636 xcache.size = 128M
 637 xcache.count = 4
 638 xcache.slots = 8K
 639 xcache.ttl = 0
 640 xcache.gc_interval = 0
 641 
 642 xcache.var_size = 64M
 643 xcache.var_count = 1
 644 xcache.var_slots = 8K
 645 xcache.var_ttl = 0
 646 xcache.var_maxttl = 0
 647 xcache.var_gc_interval = 300
 648 xcache.test = Off
 649 
 650 xcache.readonly_protection = Off
 651 xcache.mmap_path = "/tmp/xcache"
 652 xcache.coredump_directory = ""
 653 
 654 xcache.cacher = On
 655 xcache.stat = On
 656 xcache.optimizer = Off
 657 
 658 [xcache-coverager]
 659 xcache.coverager = On
 660 xcache.coveragedump_directory = ""

但无论我将 xcache.var_size 参数设置为什么,我仍然继续收到错误。这发生在 xcache 1.2.2 和 1.3.0 上。任何帮助将不胜感激。

I am trying to use xcache with zend framework to cache the metadata from Zend_Db_Table_Abstract so that describe queries are only called once per table. When implementing xcache into my bootstrap and running the application, I am being presented with the following error:

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /home/randall/htdocs/lib/Zend/Cache/Backend/Xcache.php on line 95.

I have adjusted the settings in my php.ini:

; XCACHE
 626 [xcache-common]
 627 zend_extension=/usr/lib/php5/20060613/xcache.so
 628 
 629 [xcache-admin]
 630 xcache.admin.enable_auth = On
 631 xcache.admin.user = "user"
 632 xcache.admin.password = "********"
 633 
 634 [xcache]
 635 xcache.shm.scheme = "mmap"
 636 xcache.size = 128M
 637 xcache.count = 4
 638 xcache.slots = 8K
 639 xcache.ttl = 0
 640 xcache.gc_interval = 0
 641 
 642 xcache.var_size = 64M
 643 xcache.var_count = 1
 644 xcache.var_slots = 8K
 645 xcache.var_ttl = 0
 646 xcache.var_maxttl = 0
 647 xcache.var_gc_interval = 300
 648 xcache.test = Off
 649 
 650 xcache.readonly_protection = Off
 651 xcache.mmap_path = "/tmp/xcache"
 652 xcache.coredump_directory = ""
 653 
 654 xcache.cacher = On
 655 xcache.stat = On
 656 xcache.optimizer = Off
 657 
 658 [xcache-coverager]
 659 xcache.coverager = On
 660 xcache.coveragedump_directory = ""

but i still continue to get the error no matter what I set the xcache.var_size parameter to. This occurs on xcache 1.2.2 and 1.3.0. Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

因为看清所以看轻 2024-09-11 10:49:28

运行 phpinfo(),并查看这些设置是否准确/确保加载正确的 php.ini。另外,尝试将 mmap_path 设置为“/dev/zero”(它所做的只是禁用 readonly_protection,无论如何你都没有启用它)...

Run a phpinfo(), and see if those settings are accurate/to make sure the correct php.ini is loaded. Also, try setting the mmap_path to "/dev/zero" (All it does is disable readonly_protection, which you don't have enabled anyway)...

凉墨 2024-09-11 10:49:28

我在使用 Doctrine CLI 命令时遇到了这个问题。更改 var_size 或 mmap_path 没有效果。为了消除错误,我从 php.ini 中删除/注释掉了所有对 Xcache 的引用。命令和我的网络应用程序之后仍然有效,但错误消失了。

I had this problem with Doctrine CLI commands. Changing the var_size or the mmap_path had no effect. To get the errors to go away, I removed/commented out all references to Xcache from php.ini. The commands and my web application still worked afterwards but the errors were gone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文