Fixes #25: Add php_apc_enable_cli variable.

This commit is contained in:
Jeff Geerling 2015-02-28 21:14:51 -06:00
parent 0f190db807
commit 4595c8d5ec
3 changed files with 4 additions and 2 deletions

View File

@ -63,8 +63,9 @@ When installing APC, depending on the system and whether running PHP as a webser
php_apc_cache_by_default: "1" php_apc_cache_by_default: "1"
php_apc_shm_size: "96M" php_apc_shm_size: "96M"
php_apc_stat: "1" php_apc_stat: "1"
php_apc_enable_cli: "0"
Two APC ini directives that are often customized on a system. Set `php_apc_cache_by_default` to 0 to disable APC by default (so you could enable it on a host-by-host basis). Set the `php_apc_shm_size` so it will hold all your application code in memory with a little overhead (fragmentation or APC running out of memory will slow down PHP *dramatically*). APC ini directives that are often customized on a system. Set `php_apc_cache_by_default` to 0 to disable APC by default (so you could enable it on a host-by-host basis). Set the `php_apc_shm_size` so it will hold all your application code in memory with a little overhead (fragmentation or APC running out of memory will slow down PHP *dramatically*).
This Ansible role assumes you're including `php-pecl-apc` in the list of `php_packages`. It's rarely a good idea to run a PHP < 5.5 installation without some kind of opcode cache, and APC works great for PHP 5.3 and 5.4. This Ansible role assumes you're including `php-pecl-apc` in the list of `php_packages`. It's rarely a good idea to run a PHP < 5.5 installation without some kind of opcode cache, and APC works great for PHP 5.3 and 5.4.

View File

@ -14,6 +14,7 @@ php_apc_enabled_in_ini: false
php_apc_cache_by_default: "1" php_apc_cache_by_default: "1"
php_apc_shm_size: "96M" php_apc_shm_size: "96M"
php_apc_stat: "1" php_apc_stat: "1"
php_apc_enable_cli: "0"
# If this is set to false, none of the following options will have any effect. # If this is set to false, none of the following options will have any effect.
# Any and all changes to /etc/php.ini will be your responsibility. # Any and all changes to /etc/php.ini will be your responsibility.

View File

@ -3,6 +3,6 @@ extension=apc.so
{% endif %} {% endif %}
apc.shm_size={{ php_apc_shm_size }} apc.shm_size={{ php_apc_shm_size }}
apc.stat={{ php_apc_stat }} apc.stat={{ php_apc_stat }}
apc.enable_cli=0 apc.enable_cli={{ php_apc_enable_cli }}
apc.rfc1867=1 apc.rfc1867=1
apc.cache_by_default={{ php_apc_cache_by_default }} apc.cache_by_default={{ php_apc_cache_by_default }}