From 4121ffe26517f74fe3b6ef70972f50b3a89234ab Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Mon, 28 Jul 2014 08:54:51 -0500 Subject: [PATCH] Add php_apc_enabled_in_ini option. --- README.md | 4 ++++ defaults/main.yml | 1 + templates/apc.ini.j2 | 3 +++ 3 files changed, 8 insertions(+) diff --git a/README.md b/README.md index fda1f0f..8f7c6ce 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,10 @@ Available variables are listed below, along with default values (see `vars/main. Some commonly-adjusted PHP ini directives. Adjust to suit your system. + php_apc_enabled_in_ini: false + +When installing APC, depending on the system and whether running PHP as a webserver module or standalone via `php-fpm`, you might need the line `extension=apc.so` in `apc.ini`. If you need that line added, set this variable to true. + php_apc_cache_by_default: "1" php_apc_shm_size: "96M" diff --git a/defaults/main.yml b/defaults/main.yml index e56faec..7fe0a9d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,7 @@ php_enablerepo: "" php_memory_limit: "256M" php_max_execution_time: "60" php_upload_max_filesize: "64M" +php_apc_enabled_in_ini: false php_apc_cache_by_default: "1" php_apc_shm_size: "96M" php_date_timezone: "America/Chicago" diff --git a/templates/apc.ini.j2 b/templates/apc.ini.j2 index c72c674..effc0bd 100644 --- a/templates/apc.ini.j2 +++ b/templates/apc.ini.j2 @@ -1,3 +1,6 @@ +{% if php_apc_enabled_in_ini %} +extension=apc.so +{% endif %} apc.shm_size={{ php_apc_shm_size }} apc.enable_cli=0 apc.rfc1867=1