jOpenSimWorld

Grid Status: Online
Total Regions: 23
Visitors (30 Days): 12
Total Residents: 485
Online Now: 0
Hypergriders online: 0

error in user

11 years 8 months ago #1713 by luigitarallo
I installed the 0.26 version reinstalled the old database, I get this error in user
1253: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1' in /var/www/sito/administrator/components/com_opensim/models/opensim.php at line 317 (SELECT UserAccounts.PrincipalID AS userid, UserAccounts.FirstName AS firstname, UserAccounts.LastName AS lastname, UserAccounts.Email AS email, FROM_UNIXTIME(UserAccounts.Created,'%Y-%m-%d %H:%i:%s') AS created, GridUser.Login AS last_login, GridUser.Logout AS last_logout, IF(ISNULL(Presence.UserID),'false','true') AS online FROM UserAccounts LEFT JOIN GridUser ON UserAccounts.PrincipalID COLLATE utf8_general_ci = GridUser.UserID COLLATE utf8_general_ci LEFT JOIN Presence ON UserAccounts.PrincipalID COLLATE utf8_general_ci = Presence.UserID COLLATE utf8_general_ci WHERE (UserAccounts.FirstName LIKE '%%' OR UserAccounts.LastName LIKE '%%'))
1253: COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1' in /var/www/sito/administrator/components/com_opensim/models/opensim.php at line 317 (SELECT UserAccounts.PrincipalID AS userid, UserAccounts.FirstName AS firstname, UserAccounts.LastName AS lastname, UserAccounts.Email AS email, FROM_UNIXTIME(UserAccounts.Created,'%Y-%m-%d %H:%i:%s') AS created, GridUser.Login AS last_login, GridUser.Logout AS last_logout, IF(ISNULL(Presence.UserID),'false','true') AS online FROM UserAccounts LEFT JOIN GridUser ON UserAccounts.PrincipalID COLLATE utf8_general_ci = GridUser.UserID COLLATE utf8_general_ci LEFT JOIN Presence ON UserAccounts.PrincipalID COLLATE utf8_general_ci = Presence.UserID COLLATE utf8_general_ci WHERE (UserAccounts.UserLevel = '-2'))

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1714 by foto50
Hi luigi

This is happening when an old database is restored. It is most likely the problem that the tables UserAccounts, GridUser and/or Presence are still set to character set latin1 instead of utf8.

I'm sorry, a bit busy now, but I'll try to post some queries for phpMyAdmin for u tomorrow to solve this.

Greetz
FoTo50

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1716 by luigitarallo
Ok Foto, thank you.

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1717 by foto50
Hi luigi

Ok, here the queries are coming :) But before you change anything, I can not express enough, how important it is to make backups before you change anything in the database ;)

To explain: with "old database" I did not mean the "old OpenSim version" but rather the "old MySQL version" when first installing OpenSim. In older versions of MySQL the default character set was set to "latin1" (with collation "latin1_swedish_ci" even). But since a while - dont remember exactly what version it was - by default is used "utf8" (with collation "utf8_general_ci").

You can easy check this out on your server with executing following queries:
SHOW VARIABLES LIKE "%character%";
SHOW VARIABLES LIKE "%collation%";

As of MySQL 5.something, most lines here should show "utf8" and "utf8_general_ci".

Now to change the mentioned tables of OpenSim so the queries are working correct again are the following (did I already mention to make backup before?):
ALTER TABLE `GridUser`
MODIFY COLUMN `UserID`  varchar(255) CHARACTER SET utf8 NOT NULL FIRST ,
MODIFY COLUMN `HomeRegionID`  char(36) CHARACTER SET utf8 NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `UserID`,
MODIFY COLUMN `HomePosition`  char(64) CHARACTER SET utf8 NOT NULL DEFAULT '<0,0,0>' AFTER `HomeRegionID`,
MODIFY COLUMN `HomeLookAt`  char(64) CHARACTER SET utf8 NOT NULL DEFAULT '<0,0,0>' AFTER `HomePosition`,
MODIFY COLUMN `LastRegionID`  char(36) CHARACTER SET utf8 NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `HomeLookAt`,
MODIFY COLUMN `LastPosition`  char(64) CHARACTER SET utf8 NOT NULL DEFAULT '<0,0,0>' AFTER `LastRegionID`,
MODIFY COLUMN `LastLookAt`  char(64) CHARACTER SET utf8 NOT NULL DEFAULT '<0,0,0>' AFTER `LastPosition`,
MODIFY COLUMN `Online`  char(5) CHARACTER SET utf8 NOT NULL DEFAULT 'false' AFTER `LastLookAt`,
MODIFY COLUMN `Login`  char(16) CHARACTER SET utf8 NOT NULL DEFAULT '0' AFTER `Online`,
MODIFY COLUMN `Logout`  char(16) CHARACTER SET utf8 NOT NULL DEFAULT '0' AFTER `Login`,
DEFAULT CHARACTER SET=utf8;


ALTER TABLE `Presence`
MODIFY COLUMN `UserID`  varchar(255) CHARACTER SET utf8 NOT NULL FIRST ,
MODIFY COLUMN `RegionID`  char(36) CHARACTER SET utf8 NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `UserID`,
MODIFY COLUMN `SessionID`  char(36) CHARACTER SET utf8 NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `RegionID`,
MODIFY COLUMN `SecureSessionID`  char(36) CHARACTER SET utf8 NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' AFTER `SessionID`,
DEFAULT CHARACTER SET=utf8;


ALTER TABLE `UserAccounts`
MODIFY COLUMN `PrincipalID`  char(36) CHARACTER SET utf8 NOT NULL FIRST ,
MODIFY COLUMN `ScopeID`  char(36) CHARACTER SET utf8 NOT NULL AFTER `PrincipalID`,
MODIFY COLUMN `FirstName`  varchar(64) CHARACTER SET utf8 NOT NULL AFTER `ScopeID`,
MODIFY COLUMN `LastName`  varchar(64) CHARACTER SET utf8 NOT NULL AFTER `FirstName`,
MODIFY COLUMN `Email`  varchar(64) CHARACTER SET utf8 NULL DEFAULT NULL AFTER `LastName`,
MODIFY COLUMN `ServiceURLs`  text CHARACTER SET utf8 NULL AFTER `Email`,
MODIFY COLUMN `UserTitle`  varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '' AFTER `UserFlags`,
DEFAULT CHARACTER SET=utf8;

There are other tables as well (assets, auth, Avatars, Friends, inventoryfolders, inventoryitems, regions, tokens) with char-fields and it would be basically a good idea to keep them all with the same character set, but for this special problem here, mostly these 3 tables need to be on utf8.

I hope this helped

Greetz
FoTo50

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1723 by luigitarallo
Thanks Foto I have solved, now I have another problem when I start the sim I get this error:
22:28:24 - [APPLICATION]:
APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs

Exception: System.NullReferenceException: Object reference not set to an instance of an object
at jOpenSim.Search.OpenSearchModule.initDataUpdate (OpenSim.Region.Framework.Scenes.Scene scene, Int32 dataUpdateInterval) [0x00000] in <filename unknown>:0
at jOpenSim.Search.OpenSearchModule.PostInitialise () [0x00000] in <filename unknown>:0
at OpenSim.ApplicationPlugins.RegionModulesController.RegionModulesControllerPlugin.PostInitialise () [0x00000] in <filename unknown>:0
at OpenSim.OpenSimBase.StartupSpecific () [0x00000] in <filename unknown>:0
at OpenSim.OpenSim.StartupSpecific () [0x00000] in <filename unknown>:0
at OpenSim.Framework.Servers.BaseOpenSimServer.Startup () [0x00000] in <filename unknown>:0
at OpenSim.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0

Application is terminating: True
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at jOpenSim.Search.OpenSearchModule.initDataUpdate (OpenSim.Region.Framework.Scenes.Scene scene, Int32 dataUpdateInterval) [0x00000] in <filename unknown>:0
at jOpenSim.Search.OpenSearchModule.PostInitialise () [0x00000] in <filename unknown>:0
at OpenSim.ApplicationPlugins.RegionModulesController.RegionModulesControllerPlugin.PostInitialise () [0x00000] in <filename unknown>:0
at OpenSim.OpenSimBase.StartupSpecific () [0x00000] in <filename unknown>:0
at OpenSim.OpenSim.StartupSpecific () [0x00000] in <filename unknown>:0
at OpenSim.Framework.Servers.BaseOpenSimServer.Startup () [0x00000] in <filename unknown>:0
at OpenSim.Application.Main (System.String[] args) [0x00000] in <filename unknown>:0

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1724 by foto50
Hi luigi

Did you replace the "old" modules (search and profile) with the new ones from 0.2.6?

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1726 by luigitarallo
Yes, Foto I replaced the old modules with the new, the strange thing is that 3 of 38 sim games are other damage that mistake, I use opensime 0.7.5 relase

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1733 by foto50
Hi luigi

I have updated all modules today to version 0.2.6.3. Please let me know if they solved your issue now :)

Greetz
FoTo50

Please Log in or Create an account to join the conversation.

11 years 8 months ago #1736 by luigitarallo
Thanks Foto I have solved.
Luigi.

Please Log in or Create an account to join the conversation.

Time to create page: 0.121 seconds

Search

Donate jOpenSim

Please consider supporting our efforts.

Amount

Our Regions

Region: Loc X: Loc Y:
Agora 1000 998
BareBad… 997 997
Bohemas 996 998
BoraBor… 1002 999
Crystal… 1001 1000
DeepTho… 1005 998
FoToSan… 999 995
jCity 1001 997
jOpenWe… 1000 999
JuniorT… 1002 1001
Kanadah… 1002 1000
LindaKe… 1000 997
LittleC… 996 997
MonteSc… 1001 1001
Naos 999 999
Pangaea 1005 1003
RiverSi… 999 1000
Sakani 999 998
Snambin 1001 998
Tartola 997 998
ViewerH… 1002 998
WaterWo… 1001 999
WilderK… 1000 1000

jOpenSimWorld

Grid Status: Online
Total Regions: 23
Visitors (30 Days): 12
Total Residents: 485
Online Now: 0
Hypergriders online: 0