• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Mysql/Install debugg

Mjmackan

Mapper ~ Writer
Joined
Jul 18, 2009
Messages
1,488
Solutions
18
Reaction score
199
Location
Sweden
Using 0.2.8.0 (870) and the following sorce code for this i get this bugg when trying to install gesior webpage:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'skulltime' in 'field list'' in C:\xampp\htdocs\install.php:505 Stack trace: #0 C:\xampp\htdocs\install.php(505): PDO->query('INSERT INTO pla...') #1 {main} thrown in C:\xampp\htdocs\install.php on line 505
and this when jumping to "set admin account":
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:229 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(229): PDO->query('SELECT `id`, `n...') #1 C:\xampp\htdocs\install.php(558): OTS_Account->load(1) #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 229
I think i may should use ModernAcc or something but i aint god at ModernAcc, its to complicated so i use Gesior 0.3.6 instead... and mysql 1.6.8 if i remember right!

When using another mysql source i get this mysql_query bugg in the distro:
PHP:
[16/02/2011 18:04:55] > MySQL ERROR mysql_real_query: SELECT `ip`, `mask`, `time` FROM `bans` WHERE `type` = 1; Unknown column 'ip' in 'field list'
[16/02/2011 18:04:55] > MySQL ERROR mysql_real_query: SELECT `id`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `id` = 235532 LIMIT 1; Unknown column 'type' in 'field list'
 
Last edited:
Modern AAC:
SQL:
ALTER TABLE `players` ADD `skulltime` INT(11) DEFAULT 0;
ALTER TABLE `accounts` ADD `name` VARCHAR(50) DEFAULT '';

Gesior AAC:
SQL:
ALTER TABLE `bans` ADD `ip` INT(11) DEFAULT 0;
ALTER TABLE `accounts` ADD `type` INT(11) DEFAULT 0;
 
Thanks but a new error was found now, when trying to log into my character it says: Your character could not be loaded.

In my distro it shows this:
PHP:
[17/02/2011 13:15:04] > MySQL ERROR mysql_real_query: SELECT `ip`, `mask`, `time` FROM `bans` WHERE `type` = 1; Unknown column 'mask' in 'field list'
[17/02/2011 13:15:04] > MySQL ERROR mysql_real_query: SELECT `type` FROM `bans` WHERE `type` = 2 AND `player` = 2 LIMIT 1; Unknown column 'player' in 'where clause'
[17/02/2011 13:15:04] > MySQL ERROR mysql_real_query: SELECT `id`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `blessings`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `conditions`, `redskulltime`, `redskull`, `guildnick`, `rank_id`, `town_id` FROM `players` WHERE `name` = 'Athenia GoD' LIMIT 1; Unknown column 'redskulltime' in 'field list'
 
Last edited:
SQL:
ALTER TABLE `bans` ADD `player` INT(11), `mask` INT(11) DEFAULT 0; -- I'm just assuming that mask should be an integer, correct me if I'm wrong?
ALTER TABLE `players` ADD `redskulltime` INT(11) DEFAULT 0;
 
PHP:
ALTER TABLE `bans` ADD `player` INT(11), `mask` INT(11) DEFAULT 0; -- I'm just assuming that mask should be an integer, correct me if I'm wrong?
gets this error:
PHP:
Fel

SQL-fråga:

ALTER TABLE `bans` ADD `player` INT( 11 ) ,
`mask` INT( 11 ) DEFAULT 0

MySQL sa: Dokumentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`mask` INT(11) DEFAULT 0' at line 1
 
SQL:
ALTER TABLE `bans` ADD `player` INT(11), `mask` INT(11) DEFAULT 0;
ALTER TABLE `players` ADD `redskulltime` INT(11) DEFAULT 0;
 
Just the ban part still gets that error:
PHP:
Fel

SQL-fråga:

ALTER TABLE `bans` ADD `player` INT( 11 ) ,
`mask` INT( 11 ) DEFAULT 0

MySQL sa: Dokumentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`mask` INT(11) DEFAULT 0' at line 1
 
Oh, my bad. I forgot one of the 'ADD' keywords.
SQL:
ALTER TABLE `bans` ADD `player` INT(11), ADD `mask` INT(11) DEFAULT 0;
 
Only two errors left in the distro now:
*When trying to log into character it says: "Your character could not be loaded."*
PHP:
[17/02/2011 15:41:37] > MySQL ERROR mysql_real_query: SELECT `ip`, `mask`, `time` FROM `bans` WHERE `type` = 1; Unknown column 'time' in 'field list'
[17/02/2011 15:41:37] > MySQL ERROR mysql_real_query: SELECT `id`, `account_id`, `group_id`, `sex`, `vocation`, `experience`, `level`, `maglevel`, `health`, `healthmax`, `blessings`, `mana`, `manamax`, `manaspent`, `soul`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastlogout`, `lastip`, `conditions`, `redskulltime`, `redskull`, `guildnick`, `rank_id`, `town_id` FROM `players` WHERE `name` = 'Athenia GoD' LIMIT 1; Unknown column 'redskull' in 'field list'
 
SQL:
ALTER TABLE `bans` ADD `time` INT(11) DEFAULT 0;
ALTER TABLE `redskull` INT(11) DEFAULT 0;
 
Error on
PHP:
ALTER TABLE `bans` ADD `time` INT(11) DEFAULT 0;
got this error:
PHP:
Fel

SQL-fråga:

ALTER TABLE `bans` ADD `time` INT( 11 ) DEFAULT 0

MySQL sa: Dokumentation
#1060 - Duplicate column name 'time'
but i think its cause its allready added.
Second error
PHP:
ALTER TABLE `redskull` INT(11) DEFAULT 0;
gets this:
PHP:
Fel

SQL-fråga:

ALTER TABLE `redskull` INT( 11 ) DEFAULT 0

MySQL sa: Dokumentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INT(11) DEFAULT 0' at line 1
 
Oh, lol. I failed on the second query.
SQL:
ALTER TABLE `players` ADD `redskull` INT(11) DEFAULT 0;
 
Now i am able to even log into the character but some new errors did show up:

PHP:
[17/02/2011 15:58:40] > MySQL ERROR mysql_real_query: SELECT `name`, `flags`, `access`, `maxdepotitems`, `maxviplist` FROM `groups` WHERE `id` = 1 LIMIT 1; Table 'athenia.groups' doesn't exist
[17/02/2011 15:58:40] > MySQL ERROR mysql_real_query: SELECT `banned_by`, `time`, `reason_id`, `action_id`, `comment` FROM `bans` WHERE `type` = 3 AND `account` = 1 AND `time` > 1297954720 LIMIT 1; Unknown column 'banned_by' in 'field list'
[17/02/2011 15:58:40] > MySQL ERROR mysql_real_query: SELECT `banned_by`, `time`, `reason_id`, `action_id`, `comment` FROM `bans` WHERE `type` = 5 AND `account` = 1 LIMIT 1; Unknown column 'banned_by' in 'field list'
[17/02/2011 15:58:40] > MySQL ERROR mysql_real_query: SELECT `name`, `flags`, `access`, `maxdepotitems`, `maxviplist` FROM `groups` WHERE `id` = 1 LIMIT 1; Table 'athenia.groups' doesn't exist
 
I do not have the schema for the groups table, search around for it or look in the default The Forgotten Server schema.
 
Okay i did see ive got it downloaded allready, i am very thankfull, very very thankfull!
I hope otland got more members like you :)
 
Just one more, this last errors what they exactly is bugging? Something id really need to fix since when i added the schema, that one ive got when downloading tfs it did removed my samples and the homepage stopped working showing this bug:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:229 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(229): PDO->query('SELECT `id`, `n...') #1 C:\xampp\htdocs\index.php(27): OTS_Account->load('1') #2 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 229
 
It appears to me that you are using an AAC that is not really suitable for your server, and adding the name column won't do much good. You would also have to change all of the functions to fetch the ID/accno (or whatever field you store your account numbers in) instead of the name, or change the sources to store it in the name field instead.

The best way would be if you just find a suitable AAC, meant for your server distro/version.
 
Back
Top