Skip to content
Snippets Groups Projects
Commit c8d38ada authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[FEATURE] Support configurable PHP version

parent 5b018fad
No related branches found
No related tags found
No related merge requests found
......@@ -13,10 +13,8 @@ default['typo3_site']['typo3_version'] = '7.6'
if node['platform_version'] == '16.04'
default['typo3_site']['mysql_version'] = '5.7'
default['typo3_site']['php_version'] = '7.1' # either 7.0 or 7.1
else
default['typo3_site']['mysql_version'] = '5.6'
default['typo3_site']['php_version'] = '-' # option is not available for older platforms
end
default['typo3_site']['solr']['init'] = false
......
......@@ -75,7 +75,7 @@ include_recipe 'apache2'
include_recipe 'apache2::mod_ssl'
if node['platform_version'] == '16.04'
package 'libapache2-mod-php' + node['typo3_site']['php_version']
package 'libapache2-mod-php' + node['ubuntu_base']['php_version']
%w(php php-cli php-curl php-intl php-gd php-mcrypt php-mysql php-xml php-json php-mbstring php-soap php-zip php-imagick).each do |name|
package name do
action :install
......@@ -106,67 +106,67 @@ end
if node['platform_version'] == '16.04'
replace_or_add 'Increase time limit' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern 'max_execution_time =.*'
line 'max_execution_time = 240'
end
replace_or_add 'Increase time limit - CLI' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/cli/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/cli/php.ini'
pattern 'max_execution_time =.*'
line 'max_execution_time = 240'
end
replace_or_add 'Increase memory limit' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern 'memory_limit =.*'
line 'memory_limit = 256M'
end
replace_or_add 'Increase upload size limit' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern 'upload_max_filesize =.*'
line 'upload_max_filesize = 10M'
end
replace_or_add 'Increase upload size limit - CLI' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/cli/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/cli/php.ini'
pattern 'upload_max_filesize =.*'
line 'upload_max_filesize = 10M'
end
replace_or_add 'Increase post_max_size limit' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern 'post_max_size =.*'
line 'post_max_size = 10M'
end
replace_or_add 'Increase post_max_size limit - CLI' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/cli/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/cli/php.ini'
pattern 'post_max_size =.*'
line 'post_max_size = 10M'
end
replace_or_add 'Set date.timezone' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern 'date.timezone =.*'
line 'date.timezone = Europe/Berlin'
end
replace_or_add 'Set date.timezone - CLI' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/cli/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/cli/php.ini'
pattern 'date.timezone =.*'
line 'date.timezone = Europe/Berlin'
end
replace_or_add 'Set max_input_vars' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/apache2/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/apache2/php.ini'
pattern '.*max_input_vars =.*'
line 'max_input_vars = 1500'
end
replace_or_add 'Set max_input_vars - CLI' do
path '/etc/php/' + node['typo3_site']['php_version'] + '/cli/php.ini'
path '/etc/php/' + node['ubuntu_base']['php_version'] + '/cli/php.ini'
pattern '.*max_input_vars =.*'
line 'max_input_vars = 1500'
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment