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/metadata.rb b/metadata.rb index 352db1d..b1643b1 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,12 +4,12 @@ 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" -depends "apt", ">= 1.8.4" -depends "php", "= 1.1.8" +depends "apt", "= 1.8.4" +depends "php", "= 1.1.0" depends "chef-php-extra" %w{ ubuntu debian centos redhat fedora }.each do |os| diff --git a/recipes/PHP_CodeSniffer.rb b/recipes/PHP_CodeSniffer.rb index 15e675c..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 +end \ No newline at end of file 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" ] => { 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( 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