summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortill <till@php.net>2009-07-14 15:05:57 +0000
committertill <till@php.net>2009-07-14 15:05:57 +0000
commitf7df6c4c4d2e132997f5ed248c1d3dab2f575be5 (patch)
tree72ca53e0ca0aba8e5bb9cf64121e4c48a7d4d8b1
parentdf3c3570cda2b4099a2d9f9f501e8babc952f652 (diff)
* added check for date.timezone
-rw-r--r--installer/check.php23
1 files changed, 20 insertions, 3 deletions
diff --git a/installer/check.php b/installer/check.php
index 848131e51..392ea49dc 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -16,7 +16,7 @@ $supported_dbs = array('MySQL' => 'mysql', 'MySQLi' => 'mysqli',
$ini_checks = array('file_uploads' => 1, 'session.auto_start' => 0,
'zend.ze1_compatibility_mode' => 0, 'mbstring.func_overload' => 0,
- 'suhosin.session.encrypt' => 0);
+ 'suhosin.session.encrypt' => 0, 'date.timezone' => '-NOTEMPTY-');
$source_urls = array(
'Sockets' => 'http://www.php.net/manual/en/ref.sockets.php',
@@ -131,10 +131,27 @@ foreach ($required_libs as $classname => $file) {
foreach ($ini_checks as $var => $val) {
$status = ini_get($var);
+ if ($val === '-NOTEMPTY-') {
+ if (empty($status)) {
+ $RCI->fail($var, "cannot be empty and needs to be set");
+ } else {
+ switch ($var) {
+ case 'date.timezone':
+ if (date_default_timezone_get() === false) {
+ $RCI->fail($var, "is '$status', but the settings is wrong");
+ echo '<br />';
+ continue;
+ }
+ break;
+ }
+ $RCI->pass($var);
+ }
+ echo '<br />';
+ continue;
+ }
if ($status == $val) {
$RCI->pass($var);
- }
- else {
+ } else {
$RCI->fail($var, "is '$status', should be '$val'");
}
echo '<br />';