add support to set custom opcache.so location (#157)

This commit is contained in:
Jarkko Mönkkönen 2016-11-07 20:36:24 +02:00 committed by Jeff Geerling
parent 0e8640e0ee
commit f8082e4602
3 changed files with 5 additions and 1 deletions

View File

@ -97,6 +97,7 @@ Various defaults for PHP. Only used if `php_use_managed_ini` is set to `true`.
The OpCache is included in PHP starting in version 5.5, and the following variables will only take effect if the version of PHP you have installed is 5.5 or greater.
php_opcache_zend_extension: "opcache.so"
php_opcache_enable: "1"
php_opcache_enable_cli: "0"
php_opcache_memory_consumption: "96"
@ -110,6 +111,8 @@ The OpCache is included in PHP starting in version 5.5, and the following variab
OpCache ini directives that are often customized on a system. Make sure you have enough memory and file slots allocated in the OpCache (`php_opcache_memory_consumption`, in MB, and `php_opcache_max_accelerated_files`) to contain all the PHP code you are running. If not, you may get less-than-optimal performance!
For custom opcache.so location provide full path with `php_opcache_zend_extension`.
php_opcache_conf_filename: [platform-specific]
The platform-specific opcache configuration filename. Generally the default should work, but in some cases, you may need to override the filename.

View File

@ -26,6 +26,7 @@ php_fpm_pm_max_spare_servers: 5
php_executable: "php"
# OpCache settings (useful for PHP >=5.5).
php_opcache_zend_extension: "opcache.so"
php_opcache_enable: "1"
php_opcache_enable_cli: "0"
php_opcache_memory_consumption: "96"

View File

@ -1,4 +1,4 @@
zend_extension=opcache.so
zend_extension={{ php_opcache_zend_extension }}
opcache.enable={{ php_opcache_enable }}
opcache.enable_cli={{ php_opcache_enable_cli }}
opcache.memory_consumption={{ php_opcache_memory_consumption }}