From c5042d468e605a7ec9bb6883ba721c8fd222b4ec Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Mon, 25 Feb 2008 18:03:54 -0500
Subject: [PATCH] More installer stuff

---
 installer/check.php |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/installer/check.php b/installer/check.php
index 33264a0..9f54d8f 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -1,9 +1,5 @@
 <?php
 
-$docroot = realpath(dirname(__FILE__) . '/../');
-$include_path  = $docroot . '/program/lib' . PATH_SEPARATOR . $docroot . '/program' . PATH_SEPARATOR . ini_get('include_path');
-set_include_path($include_path);
-
 $required_php_exts = array('PCRE' => 'pcre', 'Session' => 'session', 'Sockets' => 'sockets');
 
 $optional_php_exts = array('FileInfo' => 'fileinfo', 'Libiconv' => 'iconv', 'Multibyte' => 'mbstring', 'OpenSSL' => 'openssl');
@@ -13,6 +9,10 @@
 
 $supported_dbs = array('MySQL' => 'mysql', 'MySQLi' => 'mysqli',
     'PostgreSQL' => 'pgsql', 'SQLite (v2)' => 'sqlite');
+
+$ini_checks = array('file_uploads' => 1, 'session.auto_start' => 0,
+    'magic_quotes_gpc' => 0, 'magic_quotes_sybase' => 0,
+    'zlib.output_compression' => 0);
 
 $source_urls = array(
     'Sockets' => 'http://www.php.net/manual/en/ref.sockets.php',
@@ -122,6 +122,27 @@
     echo "<br />";
 }
 
+
+?>
+
+<h3>Checking php.ini/.htaccess settings</h3>
+
+<?php
+
+foreach ($ini_checks as $var => $val) {
+    $status = ini_get($var);
+    if ($status == $val) {
+        $RCI->pass($var);
+    }
+    else {
+      $RCI->fail($var, "is '$status', should be '$val'");
+    }
+    echo '<br />';
+}
+?>
+
+<?php
+
 if ($RCI->failures)
   echo '<p class="warning">Sorry but your webserver does not meet the requirements for RoundCube!<br />
             Please install the missing modules according to the above check results.</p>';

--
Gitblit v1.9.1