--- CRM/Utils/System/Drupal.php
+++ CRM/Utils/System/Drupal.php	
@@ -608,9 +608,9 @@
     }
 
     // load drupal bootstrap
-    chdir($cmsPath);
-    define('DRUPAL_ROOT', $cmsPath);
-    require_once 'includes/bootstrap.inc';
+    //chdir($cmsPath);
+    //define('DRUPAL_ROOT', $cmsPath);
+    //require_once 'includes/bootstrap.inc';
     drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
 
     // explicitly setting error reporting, since we cannot handle drupal related notices
@@ -785,6 +785,7 @@
     //CRM-7803 -from d7 onward.
     $config = CRM_Core_Config::singleton();
     if (function_exists('variable_get') &&
+      function_exists('module_exists') &&
       module_exists('locale') &&
       function_exists('language_negotiation_get')
     ) {
              