fixed database connection

Warning: the config.php file needs small tweak based on template