Jak go rozwiązać? Szukałem na Googlach i nic nie znalazłem.
Parse error: syntax error, unexpected '{' in /var/www/sites/yoyo.pl/o/d/odinots/config-and-functions.php on line 63<?PHP
// ###################### CONFIG ########################
//load page config file
//check install
if($config['site']['install'] != "no") {
header("Location: install.php"); }
//parse data from page config file
$vocations_from_config = explode(":", $config['site']['char_vocations']); foreach(explode(":", $config['site']['char_vocations']) as $value) {
$char_vocations_add = explode(",", $value); $config['char_vocations'][$char_vocations_add['0']] = $char_vocations_add['1'];
}
if($config['site']['char_type'] != "main") {
$config['char_vocations']['Rook'] = $config['site']['char_rook_name'];
}
foreach(explode(":", $config['site']['towns_list']) as $value) {
$towns_list[$add_town['0']] = $add_town['1'];
}
$config_vocations = explode(",", $config['site']['vocations_list']); $config_vocations_short = explode(",", $config['site']['vocations_short_list']); //load server config
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua'); if(isset($config['server']['mysqlHost'])) {
//new (0.2.6+) ots config.lua file
$mysqlhost = $config['server']['mysqlHost'];
$mysqluser = $config['server']['mysqlUser'];
$mysqlpass = $config['server']['mysqlPass'];
$mysqldatabase = $config['server']['mysqlDatabase'];
}
elseif(isset($config['server']['sqlHost'])) {
//old (0.2.4) ots config.lua file
$mysqlhost = $config['server']['sqlHost'];
$mysqluser = $config['server']['sqlUser'];
$mysqlpass = $config['server']['sqlPass'];
$mysqldatabase = $config['server']['sqlDatabase'];
}
$sqlitefile = $config['server']['sqliteDatabase'];
$passwordency = '';
if(strtolower($config['server']['useMD5Passwords']) == 'yes' || strtolower($config['server']['passwordType']) == 'md5') {
$passwordency = 'md5';
}
if(strtolower($config['server']['passwordType']) == 'sha1') {
$passwordency = 'sha1';
}
// loads #####POT mainfile#####
include('pot/OTS.php');
// PDO and POT connects to database
$ots = POT::getInstance();
if(strtolower($config['server']['sqlType']) == "mysql") {
//connect to MySQL database
try
{
$ots->connect(POT
::DB_MYSQL, array('host' => $mysqlhost, 'user' => $mysqluser, 'password' => $mysqlpass, 'database' => $mysqldatabase) ); }
catch(PDOException $error)
{
echo 'Database error - can\'t connect to MySQL database. Possible reasons:<br>1. MySQL server is not running on host.<br>2. MySQL user, password, database or host isn\'t configured in: <b>'.$config['site']['server_path'].'config.lua</b> .<br>3. MySQL user, password, database or host is wrong.'; }
}
Ten post edytował nololob 12.04.2010, 16:53:41