• 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:
I have tryied plenty, Modern, Gesior acc 0.3.8 and now using Gesior acc 0.3.6
Modern acc couldnt connect to my mys*l and gesior acc 0.3.8 had lot of bugs, could you show me a link or a name of an acc that would work with TheForgottenServer 0.2.10.0
 
Yes i am kind off known about gesiors "security"

Edit: Gesior ACC 0.3.1 didnt had a working "account management" but what do that errors exactly changes?
Btw change your sign to sql master :)
 
Last edited:
Gesior ACC 0.3.1 didnt had a working "account management" but what do that errors exactly changes?
Well the thing is that your account numbers are most likely stored in a database column called 'id' or 'accno'. And the AAC is assuming that it is stored within the 'name' column, and even if we added the 'name' column to your database it would be empty. The AAC would not function properly as it would always return an empty name. You would not be able to create accounts through it either, because your server would read the 'id'/'accno' column instead of the 'name' column that the AAC uses, which basically means that you would not be able to login to your account anyway. The only two options you have are to either modify the sources of your server to use the 'name' column, or your AAC to use the 'id'/'accno' field. Or to find an AAC that is meant for your server version.

Btw change your sign to sql master :)
Hehe. ;-)
 
Ive just figured out to fix the bugs in the distro but when trying to log into the accountmanagement at the homepage it says:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'active' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:794 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(794): PDO->query('SELECT `active`...') #1 C:\xampp\htdocs\pot\OTS_Account.php(771): OTS_Account->loadBan() #2 C:\xampp\htdocs\accountmanagement.php(30): OTS_Account->isBanned() #3 C:\xampp\htdocs\index.php(142): include('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 794
 
I cant get at the homepage at all and not the accoutmanagement either this shows up when i am only adding the ip in the browser:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause'' in C:\xampp\htdocs\latestnews.php:16 Stack trace: #0 C:\xampp\htdocs\latestnews.php(16): PDO->query('SELECT COUNT(*)...') #1 C:\xampp\htdocs\index.php(70): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\latestnews.php on line 16
 
Hahah i just pissed my self okay not really but before when i tried remove this it just changed and said another line was failing the line is:
PHP:
$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();
do you think you could replace it with something?
Another important thing is when i am trying to log into my account it says:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'active' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:794 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(794): PDO->query('SELECT `active`...') #1 C:\xampp\htdocs\pot\OTS_Account.php(771): OTS_Account->loadBan() #2 C:\xampp\htdocs\accountmanagement.php(30): OTS_Account->isBanned() #3 C:\xampp\htdocs\index.php(142): include('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 794
 
SQL:
ALTER TABLE `bans` ADD `id` INT(11);
ALTER TABLE `accounts` ADD `active` INT(11) DEFAULT 1;
 
SQL:
ALTER TABLE `accounts` ADD `active` INT(11) DEFAULT
gets this error
SQL:
Fel

SQL-fråga:

ALTER TABLE `accounts` ADD `active` INT( 11 ) DEFAULT 1

MySQL sa: Dokumentation
#1060 - Duplicate column name 'active'
allready added?
 
Oh, my bad. Yes it already exists. It should of have been in the bans table not the accounts table.
SQL:
ALTER TABLE `bans` ADD `active` INT(11) DEFAULT 1;
 
Still fails
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'expires' in 'field list'' in C:\xampp\htdocs\pot\OTS_Account.php:794 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(794): PDO->query('SELECT `active`...') #1 C:\xampp\htdocs\pot\OTS_Account.php(771): OTS_Account->loadBan() #2 C:\xampp\htdocs\accountmanagement.php(30): OTS_Account->isBanned() #3 C:\xampp\htdocs\index.php(142): include('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 794
 
We're getting forward though, seeing as the error differs each time. Anyhow, the reason you are getting all these errors are because your distro and your website uses two different schemas.
SQL:
ALTER TABLE `bans` ADD `expires` INT(11) DEFAULT 0;
 
Yes its fantastic how a person like you are struggeling against this only for a random person you doesn't even know its very hm i doesn't even got a word for it you're an angel for me doing this. I know its cause i doesn't got the right ACC. The schema i got with the distro is for sql and no mysql schema was found when i was looking around.(i think) I also think that i need to use Modern acc with this but it wont connect to my mysql.
Here is the new error:
PHP:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'value' in 'where clause'' in C:\xampp\htdocs\pot\OTS_Account.php:794 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Account.php(794): PDO->query('SELECT `active`...') #1 C:\xampp\htdocs\pot\OTS_Account.php(771): OTS_Account->loadBan() #2 C:\xampp\htdocs\accountmanagement.php(30): OTS_Account->isBanned() #3 C:\xampp\htdocs\index.php(142): include('C:\xampp\htdocs...') #4 {main} thrown in C:\xampp\htdocs\pot\OTS_Account.php on line 794
 
Hehe, why thank you for the kind words! I find joy in assisting people, so there's no effort being spent faulty whatsoever from my side.
SQL:
ALTER TABLE `bans` ADD `value` INT(11) DEFAULT 0;
 
Accountmanagement 100% working :D but when making character this cames up: (should i post this with mysql or php?, sql right?)
SQL:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 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 'WHERE `player_id` = 8 AND `skillid` = 0' at line 1' in C:\xampp\htdocs\pot\OTS_Player.php:195 Stack trace: #0 C:\xampp\htdocs\pot\OTS_Player.php(195): PDO->query('UPDATE `player_...') #1 C:\xampp\htdocs\accountmanagement.php(810): OTS_Player->save() #2 C:\xampp\htdocs\index.php(142): include('C:\xampp\htdocs...') #3 {main} thrown in C:\xampp\htdocs\pot\OTS_Player.php on line 195
Edit: The character makes but i still wanna get out of these errors!
 
It would be more suited with PHP tags ;-)

Either way, could you please show me line 808-812 in your accountmanagement.php file? If your editor does not have line counting and you don't feel like counting all of the lines manually you may most likely press CTRL + G to search for a certain line.
 
Ok good to know and to the bad thing... With wordpad that doesnt work and with the other program it doesnt line the lines if you get me right xD It says that maximum is 135 lines. Another thing when making new account and character and when trying to log into the game it says: Account number or password is not correct. There is not showing any bugs at all but first thought is that the server cant get in connect with my mysql, but with the admin account you can log in. (where all the samples is)
 
Heh, ok ok. May I recommend you getting a PHP editor? It is really handy. :-)

Are you using any kind of password encryption for your server?
 
Back
Top