From 369595f5b4b532e2f152a79a0f571a97b802eba6 Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Thu, 25 Apr 2013 15:36:47 +0100 Subject: [PATCH 1/8] Make memory_limit configurable --- attributes/default.rb | 1 + templates/centos/php.ini.erb | 10 +++++----- templates/default/php.ini.erb | 4 ++-- templates/redhat/php.ini.erb | 10 +++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 79ed5d5..fdaa20d 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -11,6 +11,7 @@ default['xdebug']['profiler_output_dir'] = "/tmp/cachegrind" default['php']['ius'] = "5.3" +default['php']['memory_limit'] = "128M" default['xcache']['zend_extension'] = '/usr/lib64/php/modules/xcache.so' diff --git a/templates/centos/php.ini.erb b/templates/centos/php.ini.erb index a2890e6..a60dad5 100644 --- a/templates/centos/php.ini.erb +++ b/templates/centos/php.ini.erb @@ -43,7 +43,7 @@ ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. -; +; ; ;;;;;;;;;;;;;;;;;;; ; About this file ; @@ -311,7 +311,7 @@ expose_php = On max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume +memory_limit = <%= @params['memory_limit'] %> ; Maximum amount of memory a script may consume ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -623,7 +623,7 @@ default_socket_timeout = 60 ; needs to go here. Specify the location of the extension with the ; extension_dir directive above. - + ;;;; ; Note: packaged extension modules are now loaded via the .ini files ; found in the directory /etc/php.d; these are loaded by default. @@ -1064,7 +1064,7 @@ mssql.secure_connection = Off ; FreeTDS defaults to 4096 ;mssql.max_procs = -1 -; Specify client character set. +; Specify client character set. ; If empty or not set the client charset from freetds.comf is used ; This is only used when compiled with FreeTDS ;mssql.charset = "ISO-8859-1" @@ -1212,7 +1212,7 @@ tidy.clean_output = Off soap.wsdl_cache_enabled=1 ; Sets the directory name where SOAP extension will put cache files. soap.wsdl_cache_dir="/tmp" -; (time to live) Sets the number of second while cached file will be used +; (time to live) Sets the number of second while cached file will be used ; instead of original one. soap.wsdl_cache_ttl=86400 diff --git a/templates/default/php.ini.erb b/templates/default/php.ini.erb index 722c841..e9811da 100644 --- a/templates/default/php.ini.erb +++ b/templates/default/php.ini.erb @@ -455,7 +455,7 @@ max_input_time = 60 ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit -memory_limit = 128M +memory_limit = <%= @params['memory_limit'] %> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging ; @@ -1592,7 +1592,7 @@ session.entropy_length = 0 ; Specified here to create the session id. ; http://php.net/session.entropy-file ; On systems that don't have /dev/urandom /dev/arandom can be used -; On windows, setting the entropy_length setting will activate the +; On windows, setting the entropy_length setting will activate the ; Windows random source (using the CryptoAPI) ;session.entropy_file = /dev/urandom diff --git a/templates/redhat/php.ini.erb b/templates/redhat/php.ini.erb index a2890e6..a60dad5 100644 --- a/templates/redhat/php.ini.erb +++ b/templates/redhat/php.ini.erb @@ -43,7 +43,7 @@ ; If you use constants in your value, and these constants belong to a ; dynamically loaded extension (either a PHP extension or a Zend extension), ; you may only use these constants *after* the line that loads the extension. -; +; ; ;;;;;;;;;;;;;;;;;;; ; About this file ; @@ -311,7 +311,7 @@ expose_php = On max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data -memory_limit = 128M ; Maximum amount of memory a script may consume +memory_limit = <%= @params['memory_limit'] %> ; Maximum amount of memory a script may consume ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -623,7 +623,7 @@ default_socket_timeout = 60 ; needs to go here. Specify the location of the extension with the ; extension_dir directive above. - + ;;;; ; Note: packaged extension modules are now loaded via the .ini files ; found in the directory /etc/php.d; these are loaded by default. @@ -1064,7 +1064,7 @@ mssql.secure_connection = Off ; FreeTDS defaults to 4096 ;mssql.max_procs = -1 -; Specify client character set. +; Specify client character set. ; If empty or not set the client charset from freetds.comf is used ; This is only used when compiled with FreeTDS ;mssql.charset = "ISO-8859-1" @@ -1212,7 +1212,7 @@ tidy.clean_output = Off soap.wsdl_cache_enabled=1 ; Sets the directory name where SOAP extension will put cache files. soap.wsdl_cache_dir="/tmp" -; (time to live) Sets the number of second while cached file will be used +; (time to live) Sets the number of second while cached file will be used ; instead of original one. soap.wsdl_cache_ttl=86400 From d476427b80f1312bb0ed58b5440995ff5ee352df Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Fri, 19 Jul 2013 12:53:13 +0100 Subject: [PATCH 2/8] Replace wrong php_pear provider with chef_php_extra_pear provider --- recipes/PHP_CodeSniffer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/PHP_CodeSniffer.rb b/recipes/PHP_CodeSniffer.rb index 3a1e1d8..07e12fc 100755 --- a/recipes/PHP_CodeSniffer.rb +++ b/recipes/PHP_CodeSniffer.rb @@ -19,7 +19,7 @@ include_recipe "chef-php-extra::pear" -php_pear "PHP_CodeSniffer" do +chef_php_extra_pear "PHP_CodeSniffer" do version "1.3.5" action :install end \ No newline at end of file From 1df5597e08fcf76ff0f04e295909387f28b83505 Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Fri, 19 Jul 2013 12:54:29 +0100 Subject: [PATCH 3/8] Update version of php codesnifer --- recipes/PHP_CodeSniffer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/PHP_CodeSniffer.rb b/recipes/PHP_CodeSniffer.rb index 07e12fc..facea79 100755 --- a/recipes/PHP_CodeSniffer.rb +++ b/recipes/PHP_CodeSniffer.rb @@ -20,6 +20,6 @@ include_recipe "chef-php-extra::pear" chef_php_extra_pear "PHP_CodeSniffer" do - version "1.3.5" + version "1.4.5" action :install end \ No newline at end of file From a34cd959781d26aea23d622e6b5af5fd7511d5b2 Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Fri, 19 Jul 2013 13:03:32 +0100 Subject: [PATCH 4/8] Lock apt dependency version --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 8db6bac..fb36f05 100644 --- a/metadata.rb +++ b/metadata.rb @@ -8,7 +8,7 @@ depends "git", ">= 1.0.0" depends "yum", ">= 0.8.0" -depends "apt", ">= 1.8.4" +depends "apt", "= 1.8.4" depends "php", "= 1.1.8" depends "chef-php-extra" From 914014960e30b090594efd6c93a6349851c434b6 Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Mon, 22 Jul 2013 12:30:18 +0100 Subject: [PATCH 5/8] Downgrade dependency on php cookbook to v1.1.0 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index fb36f05..1eeebde 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,7 +9,7 @@ depends "git", ">= 1.0.0" depends "yum", ">= 0.8.0" depends "apt", "= 1.8.4" -depends "php", "= 1.1.8" +depends "php", "= 1.1.0" depends "chef-php-extra" %w{ ubuntu, debian, centos, redhat, fedora }.each do |os| From bf4895eb0c018f27ebb49092e4d3dad4c6f011c3 Mon Sep 17 00:00:00 2001 From: Marco Lopes Date: Fri, 20 Sep 2013 14:09:00 +0100 Subject: [PATCH 6/8] Fix imagick recipe for redhat based distros --- recipes/module_imagick.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes/module_imagick.rb b/recipes/module_imagick.rb index c7550b6..8c9ab7c 100755 --- a/recipes/module_imagick.rb +++ b/recipes/module_imagick.rb @@ -20,11 +20,11 @@ include_recipe "chef-php-extra" if node['php']['ius'] == "5.4" - packages = %w{ php54-imagick } + packages = %w{ php54-pecl-imagick } elsif node['php']['ius'] == "5.3" - packages = %w{ php53u-imagick } + packages = %w{ php53u-pecl-imagick } else - packages = %w{ php-imagick } + packages = %w{ php-pecl-imagick } end pkgs = value_for_platform( From 927e110b1bdc683554dee7197c19a807d7fdc3de Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Tue, 5 Nov 2013 17:15:45 +0000 Subject: [PATCH 7/8] Added two additional platforms to support as part of the redhat family to be consistent with all the other recipes and defaults --- recipes/module_dev.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/module_dev.rb b/recipes/module_dev.rb index d3e7609..25ebbf8 100755 --- a/recipes/module_dev.rb +++ b/recipes/module_dev.rb @@ -28,7 +28,7 @@ end pkgs = value_for_platform( - [ "centos", "redhat", "fedora" ] => { + [ "centos", "redhat", "fedora", "amazon", "scientific ] => { "default" => packages }, [ "debian", "ubuntu" ] => { From 02c0c85d97bc1257c830373d5de75689574f4e9c Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Tue, 5 Nov 2013 17:17:02 +0000 Subject: [PATCH 8/8] Bump version to 0.5.0 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 1ca4331..b1643b1 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license "Apache 2.0" description "Installs/Configures additional PHP modules, PEAR and PECL packages" long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version "0.4.0" +version "0.5.0" depends "git", ">= 1.0.0" depends "yum", ">= 0.8.0"