summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2011-05-28 11:32:39 +0200
committermh <mh@immerda.ch>2011-10-08 10:50:15 +0200
commit34df80bc271f7ed17de879e82b54f31a98926e08 (patch)
tree3619b16f376d4721f3fc560bda933960d1dbc188 /templates
parent00c67d3de29527a957ae6efb43b98c4fa10ffd90 (diff)
first work on php_settings via hash
Diffstat (limited to 'templates')
-rw-r--r--templates/vhosts/partials/php_settings.erb7
-rw-r--r--templates/vhosts/php_gallery2/php_gallery2.erb13
2 files changed, 8 insertions, 12 deletions
diff --git a/templates/vhosts/partials/php_settings.erb b/templates/vhosts/partials/php_settings.erb
new file mode 100644
index 0000000..be4662a
--- /dev/null
+++ b/templates/vhosts/partials/php_settings.erb
@@ -0,0 +1,7 @@
+<% php_settings.each do |key,value| -%>
+<% if ['on','off' ].include?(value.downcase) -%>
+ php_admin_flag <%= key %> <%= value %>
+<% else -%>
+ php_admin_value <%= key %> <%= value %>
+<% end -%>
+<% end -%> \ No newline at end of file
diff --git a/templates/vhosts/php_gallery2/php_gallery2.erb b/templates/vhosts/php_gallery2/php_gallery2.erb
index 5935b44..b0a6591 100644
--- a/templates/vhosts/php_gallery2/php_gallery2.erb
+++ b/templates/vhosts/php_gallery2/php_gallery2.erb
@@ -31,18 +31,7 @@
<%- end -%>
<%= scope.function_template('apache/vhosts/partials/authentication.erb') %>
- php_admin_flag engine on
- php_admin_flag safe_mode Off
- php_admin_value output_buffering Off
- <%- unless php_default_charset.to_s == 'absent' then -%>
- php_admin_value default_charset <%= php_default_charset %>
- <%- end -%>
- php_admin_value open_basedir <%= documentroot %>:<%= real_php_upload_tmp_dir %>:<%= real_php_session_save_path %>:<%= gdatadir %><%= ":#{real_upload_dir.to_s}" if upload_dir.to_s != 'absent' %>
- php_admin_value upload_tmp_dir <%= real_php_upload_tmp_dir %>
- php_admin_value session.save_path <%= real_php_session_save_path %>
- <%- unless php_safe_mode_exec_bins.to_s == 'absent' then -%>
- php_admin_value safe_mode_exec_dir <%= real_php_safe_mode_exec_bin_dir %>
- <%- end -%>
+<%= scope.function_template('apache/vhosts/partials/php_settings.erb') %>
# Always rewrite login's
# Source: http://gallery.menalto.com/node/30558
RewriteEngine On