Drupal: Is Drupal 6 supporting APC?
Is Drupal 6 supporting APC ?
The reaso开发者_运维知识库n I'm asking is that I've changed webserver from Apache to Lighttpd and the PECL Progress Bar is not anymore supported.
I've been told to install APC instead, so I was wondering if:
- does Drupal supports ACP ?
- if so, do I need to install additional modules ?
thanks
APC is an opcode cache - all PHP scripts on the server benefit from it automatically.
ACP's apc.rfc1867
setting allows upload progress to be updated dynamically, which is why APC is suggested to replace the PECL upload bar. Drupal will automatically use it if present.
APC can also be used via the CacheRouter module to store Drupal's content, block, etc. caches, but that's by no means required (or even common).
I can't say if Drupal 'supports' APC, because it's more the other way around - APC supports PHP, which supports Drupal. But I've seen APC used with Drupal on several sites with good results.
In the apc.ini or php.ini file for the Drupal installation, add the following lines:
apc.ttl=604800
apc.user_ttl=3600
apc.shm_size=256M
apc.include_once_override=1
auto_globals_jit=Off
apc.num_files_hint = 2048
apc.stat_ctime = 0
apc.file_update_protection = 2
apc.stat = 0
These settings will establish a 256 MB APC allocation for the PHP caching facility. Adjust as required for lower/higher values and review the cache timing variables.
Navigate to: /usr/share/pear/apc.php on the web server & copy the apc.php file to the root folder. Then open the page in a web browser at https://example.com/apc.php.
Drupal administrators can access analytics information about the number of cached files/cache requests, amount of free memory, & total allocated RAM usage for APC.
精彩评论