Frequently Asked Questions
- What is SourceBans?
- Which ports does the SourceBans webpanel require to be open?
- Why is the webpanel showing "Error Connecting (ip:port)" for my server, when it's actually online?
- Why is the webpanel showing me a blank white page?
- My Banlist doesn't show up, but all other pages do. What can I do?
- Why is the "Ban player" option missing in SourceMod's admin menu?
- Why does the game plugin error log tell me "Database failure: Could not find database conf "sourcebans""?
- I get the following error: Database failure: [1044/1045/1130/2002/2003]
SourceBans is a global administration system for multiple Source based game servers where admins and bans can be added across more than one server.
If your web panel shows Error Connecting for your game server when it is actually online,
ask your web host to open UDP incoming from your game server port (usually 27015).
If either the RCON console, Admin Rehashing or Kick-It does not work on your web panel,
ask your web host to open TCP outgoing to your game server port (usually 27015).
Use this small testing script to get more detailed debugging information. Open the php file and add your gameserver's ip and port as described in the comments.
You should always check beforehand, if your gameserver banned your webserver's ip with listip in rcon. Remove it from the banned_ip.cfg and removeip IP via rcon.
This is because PHP has encountered a fatal error and cannot show any more of the page.
To show the error message that PHP produced, you need to add the debug parameter to your URL. For example, if your current URL is http://www.sourcebans.net/index.php then you can add the debug parameter by changing the URL to http://www.sourcebans.net/index.php?debug=1
If your URL already has parameters, then add debug on the end, like this: http://www.sourcebans.net/index.php?p=home&debug=1
In most cases, the error message will be self explanatory, but if you need help, then post on our forums.
Your PHP configuration restricts SourceBans to a certain amount of memory.
When viewing the Banlist it tries to lookup the according country for the IP. This is done by loading a ~7MB database file into the memory.
There are several ways to solve this.
- Remove the '//' in front of this line in your config.php:
define('SB_MEM', '128M'); - Ask your webhost to increase the PHP '
memory_limit' setting. - If it still doesn't show up, check the box for 'No Country Research' in your webpanel settings page.
Most likely SourceMod's basebans.smx was still loaded when you installed SourceBans' game plugin. The game plugin automatically disables basebans.smx, but your server needs to be restarted for the "Ban player" option to come available.
Some hosters might disallow plugins to move files. Make sure the basebans.smx is in the plugins/disabled folder.
You forgot to add the "sourcebans" section to SourceMod's databases.cfg, as instructed in the installation. Please go to http://your.sourcebans.install/index.php?p=admin&c=servers&o=dbsetup (replace your.sourcebans.install with your own URL) and add the "sourcebans" section to your databases.cfg.
If the error message reads "Can't connect to local MySQL server through socket", you need to find the "sourcebans" section in databases.cfg and change the value of "host" from "localhost" to the path of your mysql.sock file. If you don't know where mysql.sock is located, ask your gameserver host.
Otherwise, most likely your MySQL server does not allow incoming connections from your gameserver. To fix this, you can do either of the following:
* Go into your webserver's control panel and check if there's a section called MySQL Access Hosts or something named similar. There you can add the IP address mentioned in the error. This is usually the IP of your gameserver, but it can also be slightly different, so make sure you copy and paste it exactly from the error.
* The other option is to run the following query on your SourceBans database (for example using phpMyAdmin):
GRANT ALL ON database.* TO 'username'@'ip';
You will have to replace "database" with your SourceBans database name, and "username" and "ip" with those mentioned in the error.
