Een vriend had een retro hotel op me localhost gezet. Dan is het niet illegeaal namelijk. Als ik naar mijn localhost ga krijg ik deze error:
Notice: Undefined variable: uberdb in C:\xampp\htdocs\global.php on line 16
Notice: Undefined variable: root in C:\xampp\htdocs\global.php on line 16
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ''@'localhost' (using password: YES) in C:\xampp\htdocs\global.php on line 16
Could not connect to server, error: Access denied for user ''@'localhost' (using password: YES)
Dit is de global.php:
<?php
header('Content-Type: text/html; charset=iso-8859-1');
define('SEP', DIRECTORY_SEPARATOR);
$dir = str_replace('register'.SEP, '', dirname(__FILE__).SEP);
$dir = str_replace('functions'.SEP, '', $dir);
$dir = str_replace('housekeeping'.SEP, '', $dir);
define('DIR', $dir);
define('DOCUMENT_ROOT', DIR.SEP);
define('INCLUDES', DIR.'inc'.SEP);
define('WWW', 'http://'.$_SERVER['SERVER_NAME']);
session_start();
require_once DOCUMENT_ROOT.'config.php';
$connect = mysql_connect($localhost, $root, 123456789) or die("Could not connect to server, error: ".mysql_error());
mysql_select_db($dbname, $connect) or die("Could not connect to database, error: ".mysql_error());
require_once INCLUDES."class.core.php";
require_once INCLUDES."class.users.php";
$core = new Core();
$users = new Users();
require_once DOCUMENT_ROOT.'lang/'.$language.'.php';
define('MAINTENANCE', $core->Maintenance());
if(USERNAME_REQUIRED == TRUE && !isset($_SESSION["username"]))
header("Location: ".WWW."/characters.php");
if(ACCOUNT_REQUIRED == TRUE && !isset($_SESSION["account"]))
header("Location: ".WWW."/index.php");
$sitename = $core->CmsSetting('cms_name');
if(isset($_SESSION["username"]))
{
$username = $core->EscapeString($_SESSION['username']);
if($users->CheckBan($username))
header($users->BanInfo($username));
}
if(MAINTENANCE && !$users->UserPermission('hk_login', $username) && !defined('MAINTENANCE_PAGE'))
header("Location: ".WWW."/maintenance.php");
?>Indien nodig kan ik de config.php ook geven.