| | |
| | | } |
| | | |
| | | foreach ($config as $optname => $optval) { |
| | | if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) { |
| | | $ini_optval = filter_var(ini_get($optname), FILTER_VALIDATE_BOOLEAN); |
| | | if ($optval != $ini_optval && @ini_set($optname, $optval) === false) { |
| | | $error = "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)."; |
| | | if (defined('STDERR')) fwrite(STDERR, $error); else echo $error; |
| | |
| | | } |
| | | |
| | | // framework constants |
| | | define('RCUBE_VERSION', '0.9.1'); |
| | | define('RCUBE_VERSION', '0.9.4'); |
| | | define('RCUBE_CHARSET', 'UTF-8'); |
| | | |
| | | if (!defined('RCUBE_LIB_DIR')) { |
| | |
| | | @mb_regex_encoding(RCUBE_CHARSET); |
| | | } |
| | | |
| | | // make sure the Roundcube lib directory is in the include_path |
| | | $rcube_path = realpath(RCUBE_LIB_DIR . '..'); |
| | | $sep = PATH_SEPARATOR; |
| | | $regexp = "!(^|$sep)" . preg_quote($rcube_path, '!') . "($sep|\$)!"; |
| | | $path = ini_get('include_path'); |
| | | |
| | | if (!preg_match($regexp, $path)) { |
| | | set_include_path($path . PATH_SEPARATOR . $rcube_path); |
| | | } |
| | | |
| | | // Register autoloader |
| | | spl_autoload_register('rcube_autoload'); |
| | | |