Greetings,
I’m hoping someone can help me with this problem I'm having with SourceBans 1.4. SourceBans lives on a CentOS 6.5 machine that runs Apache 2.5 and MySql 5.1.71. It also houses my Team Fortress 2 server. It’s basically one big happy family in the same house.
Most of it works. Setup was able to find the SourceBans database and populate it with tables. I’m able to kick people from the web interface as well as send them private messages. The SourceBans plugin on the tf2 server seems happy with no errors on load.
The problem appears to be with the way the plugin and the web gui access the MySql database.
I’ve tried replacing the host field in databases.cfg with ip, localhost, and path to mysql.sock. So far, nothing has worked with sb_reload and sm_rehash between tries. I have to imagine that the soucebans db is as least accessible as evidence by the setup creating the tables in it. Sourcebans.log and configuration files follow bellow.
Any help would be greatly appreciated as I’ve been pulling my hair out for a few days now.
Thanks for having a look!
Best Regards,
Coin0p
Sourcebans.log
Databases.cfg
Code:
"Databases"
{
"driver_default" "mysql"
"sourcebans"
{
"driver" "mysql"
"host" "localhost"
"database" "sourcebans"
"user" "" //removed for post
"pass" "" //removed for post
//"timeout" "0"
"port" "3306"
}
"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}
}
Sourcebans.cfg
Code:
"SourceBans"
{
"Config"
{
// Website address to tell where the player to go for unban, etc
"Website" ""
// Allow or disallow admins access to addban command
"Addban" "1"
// Allow or disallow admins access to unban command
"Unban" "1"
// The Tableprefix you set while installing the webpanel. (default: "sb")
"DatabasePrefix" "sb"
// How many seconds to wait before retrying when a players ban fails to be checked. Min = 15.0 Max = 60.0
"RetryTime" "45.0"
// How often should we process the failed ban queue in minutes
"ProcessQueueTime" "5"
// Should the plugin automaticaly add the server to sourcebans
// (servers without -ip being set on startup need this set to 0)
"AutoAddServer" "0"
// Enable backing up config files after getting admins from database (1 = enabled, 0 = disabled)
"BackupConfigs" "1"
// Enable admin part of the plugin (1 = enabled, 0 = disabled)
"EnableAdmins" "1"
// Require the admin to login once into website
"RequireSiteLogin" "0"
// This is the ID of this server (Check in the admin panel -> servers to find the ID of this server)
//changed from -1
"ServerID" "1"
Config.php
Code:
<?php
/**
* config.php
*
* This file contains all of the configuration for the db
* that will
* @author SteamFriends Development Team
* @version 1.0.0
* @copyright SteamFriends (www.SteamFriends.com)
* @package SourceBans
*/
if(!defined('IN_SB')){echo 'You should not be here. Only follow links!';die();}
define('DB_HOST', 'localhost'); // The host/ip to your SQL server
define('DB_USER', 'username'); // The username to connect with-changed for post
define('DB_PASS', 'password'); // The password-changed for post
define('DB_NAME', 'sourcebans'); // Database name
define('DB_PREFIX', 'sb'); // The table prefix for SourceBans
define('DB_PORT','3306'); // The SQL port (Default: 3306)
//define('DEVELOPER_MODE', true); // Use if you want to show debugmessages