Nginx error when enable APC cache

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by huytp on July 20, 2013 at 5:21am

Hello,

I'm getting this error when enable APC cache. Anyone can help me resolve this issue?

2013年07月20日 11:11:50 [error] 14178#0: *10 FastCGI sent in stderr: "PHP message: PHP Fatal error: require_once(): Failed opening required '/home/www/sitename/sites/all/modules/apc/drupal_apc_cache.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /home/www/sitename/includes/bootstrap.inc on line 2308" while reading response header from upstream, client: 42.114.8.213, server: www.sitename.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.sitename.com"
~

Thank in advance!

Huy

Comments

It's on the screen

Posted by perusio on July 20, 2013 at 1:09pm

you're missing an include file from the apc module. BTW it's generally a bad idea to use the APC as a cache to store data that changes often.

Thanks you! I've got fixed

Posted by huytp on July 20, 2013 at 1:33pm

Thanks you!

I've got fixed this issue. It's my error on config APC:

Default config:

<?php
/**
* Add APC Caching.
*/
$conf['cache_backends'][] = 'sites/all/modules/apc/drupal_apc_cache.inc';
$conf['cache_class_cache'] = 'DrupalAPCCache';
?>

It should be:

<?php
...
$conf['cache_backends'][] = 'sites/all/modules/contrib/apc/drupal_apc_cache.inc';
...
?>

BTW it's generally a bad idea to use the APC as a cache to store data that changes often. -> what do you mean. In fact APC is an opcode cache for PHP. It's not used to store data at all.

p/s: I used it on my production server. Hence the PHP code is not changed so much.

At this time I'm using your

Posted by huytp on July 20, 2013 at 1:41pm

At this time I'm using your configs for my nginx server :)

Thanks you!

P/s: I understood what do you

Posted by huytp on July 20, 2013 at 2:14pm

P/s:

I understood what do you mean. Thank you so much!

Huy.

Nginx

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /