• 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!

Solved Cannot save ItemsList. Player ID not set.

asdasd11

New Member
Joined
Mar 25, 2015
Messages
40
Reaction score
0
I get this error when trying to create a character in Gesior.

Error occured!
Error ID: Cannot save ItemsList. Player ID not set.
More info:

File: /var/www/html/classes/itemslist.php Line: 67
File: /var/www/html/classes/player.php Line: 88
File: /var/www/html/pages/accountmanagement.php Line: 4870
File: /var/www/html/system/load.page.php Line: 7
File: /var/www/html/index.php Line: 42
 
Solution
'premdays' has default value 0 in TFS.
There is a big change in MySQL 5.7. Before you could set value of integer to 'NULL' or '' (empty string) and old MySQL did convert it to 0. New MySQL versions require integer to be integer.
If it says 'account has been created', there must be 'INSERT..' query with 'debug database true' and there must be some 'code' and 'error message'. Copy them and paste here.

I still recommend to change MySQL to MariaDB. It's 99% compatible with MySQL 5.6 (tell TFS it's mysql database, it will connect to it).
@asdasd11
Edit index.php, change:
PHP:
define('DEBUG_DATABASE', false);
To:
PHP:
define('DEBUG_DATABASE', true);

Then there will be many other messages above that error. Post them all.
 
thanks for the reply

Query: SELECT `id`, `name`, `password`, `premdays`, `coins`, `lastday`, `email`, `key`, `create_ip`, `creation`, `page_access`, `location`, `rlname`, `birth_date`, `gender`, `email_new`, `email_new_time`, `email_code`, `next_email`, `last_post`, `flag`, `vote`, `loyalty_points`, `guild_points` FROM `accounts` WHERE `name` = '123456'
SQLSTATE: 00000
Driver code:
Error message:
Query: SELECT `id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `deletion`, `deleted`, `balance`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `create_ip`, `create_date`, `comment`, `hide_char`, `signature`, `marriage_status`, `marriage_spouse`, `loyalty_ranking` FROM `players` WHERE `name` = 'Tested'
SQLSTATE: 00000
Driver code:
Error message:
Query: SELECT `players`.`id`, `players`.`name`, `players`.`group_id`, `players`.`account_id`, `players`.`level`, `players`.`vocation`, `players`.`health`, `players`.`healthmax`, `players`.`experience`, `players`.`lookbody`, `players`.`lookfeet`, `players`.`lookhead`, `players`.`looklegs`, `players`.`looktype`, `players`.`lookaddons`, `players`.`maglevel`, `players`.`mana`, `players`.`manamax`, `players`.`manaspent`, `players`.`soul`, `players`.`town_id`, `players`.`posx`, `players`.`posy`, `players`.`posz`, `players`.`conditions`, `players`.`cap`, `players`.`sex`, `players`.`lastlogin`, `players`.`lastip`, `players`.`save`, `players`.`skull`, `players`.`skulltime`, `players`.`lastlogout`, `players`.`blessings`, `players`.`deletion`, `players`.`deleted`, `players`.`balance`, `players`.`stamina`, `players`.`skill_fist`, `players`.`skill_fist_tries`, `players`.`skill_club`, `players`.`skill_club_tries`, `players`.`skill_sword`, `players`.`skill_sword_tries`, `players`.`skill_axe`, `players`.`skill_axe_tries`, `players`.`skill_dist`, `players`.`skill_dist_tries`, `players`.`skill_shielding`, `players`.`skill_shielding_tries`, `players`.`skill_fishing`, `players`.`skill_fishing_tries`, `players`.`create_ip`, `players`.`create_date`, `players`.`comment`, `players`.`hide_char`, `players`.`signature`, `players`.`marriage_status`, `players`.`marriage_spouse`, `players`.`loyalty_ranking` FROM `players` WHERE `account_id` = '2' ORDER BY `name` ASC
SQLSTATE: 00000
Driver code:
Error message:
Query: SELECT `id`, `name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `deletion`, `deleted`, `balance`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `create_ip`, `create_date`, `comment`, `hide_char`, `signature`, `marriage_status`, `marriage_spouse`, `loyalty_ranking` FROM `players` WHERE `name` = 'Rook Sample'
SQLSTATE: 00000
Driver code:
Error message:
Query: SELECT `player_items`.`player_id`, `player_items`.`pid`, `player_items`.`sid`, `player_items`.`itemtype`, `player_items`.`count`, `player_items`.`attributes` FROM `player_items` WHERE `player_items`.`player_id` = '1'
SQLSTATE: 00000
Driver code:
Error message:
Query: SELECT `player_id`, `key`, `value` FROM `player_storage` WHERE `player_id` = '1'
SQLSTATE: 00000
Driver code:
Error message:
Query: INSERT INTO `players` (`name`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `lastlogout`, `blessings`, `deletion`, `deleted`, `balance`, `stamina`, `skill_fist`, `skill_fist_tries`, `skill_club`, `skill_club_tries`, `skill_sword`, `skill_sword_tries`, `skill_axe`, `skill_axe_tries`, `skill_dist`, `skill_dist_tries`, `skill_shielding`, `skill_shielding_tries`, `skill_fishing`, `skill_fishing_tries`, `create_ip`, `create_date`, `comment`, `hide_char`, `signature`, `marriage_status`, `marriage_spouse`, `loyalty_ranking`) VALUES ('Tested', '1', '2', '1', '0', '150', '150', '0', '106', '95', '78', '116', '128', '0', '0', '5', '5', '0', '0', '2', '0', '0', '0', '', '400', '1', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '2520', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '10', '0', '3232235894', '1543496680', '', '0', '', '0', '-1', '0')
SQLSTATE: 22003
Driver code: 1264
Error message: Out of range value for column 'create_ip' at row 1
 
The decimal value of your ip (3,232,235,894) is out of bounds (max for signed int is 2,147,483,647)
This query will increase the boundary to allow numbers up to 4,294,967,295
Code:
ALTER TABLE `players` MODIFY `create_ip` INT(11) UNSIGNED NOT NULL DEFAULT 0
 
The decimal value of your ip (3,232,235,894) is out of bounds (max for signed int is 2,147,483,647)
This query will increase the boundary to allow numbers up to 4,294,967,295
Code:
ALTER TABLE `players` MODIFY `create_ip` INT(11) UNSIGNED NOT NULL DEFAULT 0
Thank you so much! It worked.

Anyhow, I get the following error when creating an account:

Query: INSERT INTO `accounts` (`name`, `password`, `premdays`, `coins`, `lastday`, `email`, `key`, `create_ip`, `creation`, `page_access`, `location`, `rlname`, `birth_date`, `gender`, `email_new`, `email_new_time`, `email_code`, `next_email`, `last_post`, `flag`, `vote`, `loyalty_points`, `guild_points`) VALUES ('987654', '0955df8238be57267c1af721acd1ba3597308187', '', '', '', '[email protected]', '', '3232235894', '1543596701', '', '', '', '', '', '', '', '', '', '', 'unknown', '', '', '')
SQLSTATE: HY000
Driver code: 1366
Error message: Incorrect integer value: '' for column 'premdays' at row 1
 
There are many invalid values in Gesior2012. Everything worked fine on MySQL 5.6 and lower version.
There are settings to hide errors in new MySQL, but you need to google them or find somewhere MySQL 5.6 (or MariaDB in case of linux).
 
'premdays' has default value 0 in TFS.
There is a big change in MySQL 5.7. Before you could set value of integer to 'NULL' or '' (empty string) and old MySQL did convert it to 0. New MySQL versions require integer to be integer.
If it says 'account has been created', there must be 'INSERT..' query with 'debug database true' and there must be some 'code' and 'error message'. Copy them and paste here.

I still recommend to change MySQL to MariaDB. It's 99% compatible with MySQL 5.6 (tell TFS it's mysql database, it will connect to it).
 
Solution
'premdays' has default value 0 in TFS.
There is a big change in MySQL 5.7. Before you could set value of integer to 'NULL' or '' (empty string) and old MySQL did convert it to 0. New MySQL versions require integer to be integer.
If it says 'account has been created', there must be 'INSERT..' query with 'debug database true' and there must be some 'code' and 'error message'. Copy them and paste here.

I still recommend to change MySQL to MariaDB. It's 99% compatible with MySQL 5.6 (tell TFS it's mysql database, it will connect to it).


I followed your suggestion and I switched from MySQL to MariaDB. The error has dissapeared and and I am able to make accounts.

Thank you so much Gesior.pl and Buttface Donkey for the help.
 
Back
Top