APC 设置问题和 apache2 错误

APC 设置问题和 apache2 错误

我收到一系列无法​​识别的错误;我怀疑这与 APC 有关,但我不确定:

[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  Unknown: 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/index.php]\n in Unknown on line 0
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  Unknown: apc_cache_find [2231284]\n in Unknown on line 0
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/application/bootstrap.php]\n in /var/www/sitenetos.com/index.php on line 102
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2232922]\n in /var/www/sitenetos.com/index.php on line 102
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/kohana/core.php]\n in /var/www/sitenetos.com/application/bootstrap.php on line 6
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231738]\n in /var/www/sitenetos.com/application/bootstrap.php on line 6
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/kohana.php]\n in /var/www/sitenetos.com/application/bootstrap.php on line 16
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231726]\n in /var/www/sitenetos.com/application/bootstrap.php on line 16
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/i18n.php]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231723]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/kohana/i18n.php]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231782]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/kohana/exception.php]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231742]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): 1. h->opened_path=[null]  h->filename=[/var/www/sitenetos.com/system/classes/kohana/kohana/exception.php]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Notice:  require(): apc_cache_find [2231785]\n in /var/www/sitenetos.com/system/classes/kohana/core.php on line 496
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Fatal error:  Class 'Debug' not found in /var/www/sitenetos.com/system/classes/kohana/kohana/exception.php on line 203
[Wed Jun 08 19:59:31 2011] [error] [client 10.211.55.2] PHP Fatal error:  Class 'Debug' not found in /var/www/sitenetos.com/system/classes/kohana/kohana/exception.php on line 203

答案1

有些软件与 APC 不能很好地兼容,反之亦然。

您可以随时为该目录禁用它,以查看是否是 APC 导致了错误。

添加/var/www/sitenetos.com/.htaccess

php_flag apc.cache_by_default Off
php_flag apc.enabled Off

然后检查是否再次发生。

答案2

您必须为 APC 提供大量内存。增加 shm_size 选项,直到 APC 有 20% 的未使用内存。

使用 apc 包中的 apc.php 检查内存使用情况。

相关内容