From 92bd3a7c3f60e56ec5055c96e7b2f25637d4b0ca Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sat, 17 Nov 2012 03:04:45 -0500
Subject: [PATCH] Fix parsing header in English when localized map is defined
---
program/include/iniset.php | 28 +++++++++++++++-------------
1 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/program/include/iniset.php b/program/include/iniset.php
index 2961bee..82278c9 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -20,19 +20,23 @@
+-----------------------------------------------------------------------+
*/
-// Some users are not using Installer, so we'll check some
-// critical PHP settings here. Only these, which doesn't provide
-// an error/warning in the logs later. See (#1486307).
-$crit_opts = array(
- 'mbstring.func_overload' => 0,
+$config = array(
+ 'error_reporting' => E_ALL &~ (E_NOTICE | E_STRICT),
+ // Some users are not using Installer, so we'll check some
+ // critical PHP settings here. Only these, which doesn't provide
+ // an error/warning in the logs later. See (#1486307).
+ 'mbstring.func_overload' => 0,
'suhosin.session.encrypt' => 0,
- 'session.auto_start' => 0,
- 'file_uploads' => 1,
- 'magic_quotes_runtime' => 0,
+ 'session.auto_start' => 0,
+ 'file_uploads' => 1,
+ 'magic_quotes_runtime' => 0,
+ 'magic_quotes_sybase' => 0, // #1488506
);
-foreach ($crit_opts as $optname => $optval) {
- if ($optval != ini_get($optname)) {
- die("ERROR: Wrong '$optname' option value. Read REQUIREMENTS section in INSTALL file or use Roundcube Installer, please!");
+foreach ($config as $optname => $optval) {
+ if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
+ die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
+ ."Check your PHP configuration (including php_admin_flag).\n"
+ ."Read REQUIREMENTS section in INSTALL file or use Roundcube Installer!");
}
}
@@ -58,8 +62,6 @@
if (set_include_path($include_path) === false) {
die("Fatal error: ini_set/set_include_path does not work.");
}
-
-ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT));
// increase maximum execution time for php scripts
// (does not work in safe mode)
--
Gitblit v1.9.1