diff --git a/inc/lib_base.php b/inc/lib_base.php
index 9a3319549bfb2c031cf41a4b600e6c0036a52339..f30c85d7aecfdbbb6db025cb9bcacd1026256303 100755
--- a/inc/lib_base.php
+++ b/inc/lib_base.php
@@ -31,14 +31,13 @@ ini_set('session.cookie_httponly','1;');
 session_start();
 
 // calculate the documentroot
-$DOCUMENTROOT=substr(__FILE__,0,-17);
-$SERVERROOT=$_SERVER['DOCUMENT_ROOT'];
-$count=strlen($SERVERROOT);
-$WEBROOT=substr($DOCUMENTROOT,$count);
-//echo($WEBROOT);
+$SERVERROOT=substr(__FILE__,0,-17);
+$DOCUMENTROOT=$_SERVER['DOCUMENT_ROOT'];
+$count=strlen($DOCUMENTROOT);
+$WEBROOT=substr($SERVERROOT,$count);
 
 // set the right include path
-set_include_path(get_include_path().PATH_SEPARATOR.$DOCUMENTROOT.PATH_SEPARATOR.$DOCUMENTROOT.'/inc'.PATH_SEPARATOR.$DOCUMENTROOT.'/config');
+set_include_path(get_include_path().PATH_SEPARATOR.$SERVERROOT.PATH_SEPARATOR.$SERVERROOT.'/inc'.PATH_SEPARATOR.$SERVERROOT.'/config');
 
 // define default config values
 $CONFIG_ADMINLOGIN='';
@@ -139,8 +138,8 @@ class OC_UTIL {
    *
    */
   public static function checkserver(){
-    global $DOCUMENTROOT;
-    $f=@fopen($DOCUMENTROOT.'/config/config.php','a+');
+    global $SERVERROOT;
+    $f=@fopen($SERVERROOT.'/config/config.php','a+');
     if(!$f) die('Error: Config file (config/config.php) is not writable for the webserver.');
     @fclose($f);