Nginx error when enable APC cache

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
huytp's picture

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

perusio's picture

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

huytp's picture

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

huytp's picture

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

Thanks you!

P/s: I understood what do you

huytp's picture

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: