diff --git a/htdocs/index.php b/htdocs/index.php
index 0cff96492f66027af1f1eb69f1cdd3613f294dec..f41ee8ad551fb70963fde9383f1e7656ce261b01 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -14,6 +14,7 @@ if (@$displaytime) {
     Settings
    -------------------------------------------------------- */
 
+$dbuser="apache"; // Temporary bodge by dez - should be in settings.php
 include("settings.php");
 if (!(isset($base) && isset($preferred_hostname) && isset($dbname))) {
 	echo "Website unconfigured";
@@ -40,7 +41,7 @@ $smarty->assign("baseurl", $baseurl);
 // Initialise the database
 require("/usr/share/php/adodb/adodb.inc.php");
 $DB = NewADOConnection('postgres8');
-$DB->Connect('dbname='.$dbname.' user=dez');
+$DB->Connect('dbname='.$dbname.' user='.$dbuser);
 $DB->SetFetchMode(ADODB_FETCH_ASSOC);
 
 // Include the session library
@@ -92,8 +93,9 @@ if (($n=strpos($ssl_path,"?"))!==FALSE) $ssl_path=substr($ssl_path,0,$n);
 $ssl_url = "https://".$preferred_hostname.$ssl_path;
 $smarty->assign("ssl_url", $ssl_url);
 
+
 // Determine which component to run
-$pathlist = explode('/', parse_url(@$_SERVER['ORIG_PATH_INFO'],PHP_URL_PATH));
+$pathlist = explode('/', parse_url(@$_SERVER['PATH_INFO'],PHP_URL_PATH));
 while (end($pathlist) === "") array_pop($pathlist);
 $smarty->assign_by_ref("pathlist", $pathlist);
 $path = '';
@@ -128,7 +130,6 @@ if ($path == "") $path="/";
 $smarty->assign("title", "Set Me");
 $smarty->assign("body", "Empty Body");
 
-
 // Load the component
 $comppath = $base."components/".$component['component'].".php";
 $compoutput = "";