Japanese captions unreadable after moving to a new server!

DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-03 00:14

Hello,

I have just moved my Gallery to a new server. I have a two language site, English and Japanese.

Not only have all my Japanese captions turned into question marks but the admin and navigation Japanese is haywire too!

Don’t know where to even start... Could anyone point me in the right direction. I could not find a forum related to languages/localization... Hmmm.

Looking forward to any suggestions!


Gallery version: 2.1.2
Operating system Linux
Linux kernel version 2.6.18.1-s5-mako
Apache version 1.3.37 (Unix)
Perl version 5.8.7
PHP version PHP/4.4.4
MySQL version 4.1.21-standard-log

Mine is not a better way, mine is merely another way!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-11-03 01:41

what mysql version did you have on the old server?

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-03 03:27

Well, that is a very good question that I am afraid I cannot answer easily... I will have to contact my old hosting company to find out as I have no record... I checked some recent postings of mine but I did not include that info...

In the meantime I have found that the the Admin navigation/links etc are actually working... I just reloaded and they became OK...

But for the captions, it is still no go. Even if I try to delete the unreadable captions and redo them in Japanese, once saved, they revert to question marks...

Hoping something can be done!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-11-03 03:39

This is most probably a character encoding issue.
Your old and your new server must both use the same character encoding.

G2.1.2 uses UTF-8 as storage, if the storage supports it.
If the mysql db on your old server was mysql 4.1+ or newer, it most probably was using UTF-8 for G2.
Your new mysql server is mysql 4.1.21, also capable of UTF-8.

So the questions are:
1. Was your old server using UTF-8 for the G2 tables or not?
2. Did you import the data correctly?
3. Is it using UTF-8 tables in db tables on the new server?

You can sure fix it. But we need to know the current state before we start changing anything.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-03 03:52

Thanks for the fast response!

Well, I have sent an email off to my previous host and am waiting for their reply...

As for your other questions...

2. I exported the mysql database as from the old server a .gz file then imported it to the new one.

3. I just checked phpMyAdmin and in the main window (home) I see MySQL charset: UTF-8 Unicode (utf8)

Thank you very much in advance!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-11-03 11:21

@3.
please check the tables, not just the database.
mysql can have different charactet encoding for each table, even for each column. so please check the Item table, title, summary and description should be in UTF-8.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-03 23:44

Hello!

I think you are on to something here... Using phpMyAdmin I found and checked the Item table. I am not totally sure what I am looking for but this is what I found for g_description:

Type: TEXT
Collation: latin1_swedish_ci

When I clicked on the popup menu for Collation I found utf8_unicode.ci at the very bottom... I didn’t change anything as I don’t want to mess anything up, but I guess this is what I need to be using...

If this is so, do I manually change the title, summary and description to that?

Also my old hosting company got back to me and said the mysql version was 4.1. I hope this helps.

Anyway, I await your instructions!

Thanks for your time on helping me with this!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-11-04 03:31

since you have backups, we can risk a few things.

i suggest you upgrade to the next nightly snapshot of g2.2 (not to the current one since there was a small issue).
when upgrading, it should convert your database tables / columns to utf8.

if your tables are already utf8 but your columns not, we'll have to change some code slightly and then run an admin task.
but first please do the upgrade.

the current development version of g2.2 is pretty stable, so there shouldn't be much harm in upgrading.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sat, 2006-11-04 04:47

Thanks Valiant...

I just went to the nightly snapshot page and saw that the current one appears to be Nov. 3rd and your post was Nov. 4th... So I will wait till the Nov. 4th post is released, right? I am in Japan so there is always a bit of confusion with such matters...

Anyway, once again, thank you very much!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-11-04 15:03

get the nightly build from:
gallery-nightly.zip 05-Nov-2006 06:43 (it's not available yet at the time of this writing)

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sun, 2006-11-05 22:43

Hello again,

Have just installed 2.2 over the old version... Started the upgrade process but am getting a few errors above the main graphic area of the upgrader... and not only that, if I select English as the language in the pre first step (Welcome) in the Step One I get Japanese!

The first error I get when going from Welcome to Step One:

Notice: Constant GALLERY_FORM_VARIABLE_PREFIX already defined in /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc on line 29
Gallery Upgrader

(Now all the menu’s are in Japanese... I put in my password and then I get the same message as above plus this:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc:29) in /home/globalpe/public_html/cambodiakids/Gallery2/lib/support/GallerySetupUtilities.class on line 74

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/globalpe/public_html/cambodiakids/Gallery2/bootstrap.inc:29) in /home/globalpe/public_html/cambodiakids/Gallery2/lib/support/GallerySetupUtilities.class on line 74

When I click on go to Step 2 I get returned to the pre-welcome window.

Hope you can get me up to speed on this.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-11-05 22:46

yeah, yet another bug from today's nightly. the fix is easy.

open your gallery2/bootstrap.inc file and replace

define('GALLERY_FORM_VARIABLE_PREFIX', 'g2_');

with

if (!defined('GALLERY_FORM_VARIABLE_PREFIX')) {
    define('GALLERY_FORM_VARIABLE_PREFIX', 'g2_');
}
 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sun, 2006-11-05 23:25

Thanks for that response... Glad I could get the upgrade done so other views would not see the upgrader etc...

The upgrade went well. I noticed it changing the database to UTF-8... very interesting...

I did some testing and I can now write in Japanese in the Title/Summary etc., and the Japanese is retained but all previous text and comments, etc., still have question marks...

I guess that I now have to re-upload the database? Anyway, I once again, await your instructions on how to proceed.

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-11-05 23:34

- please post here the CREATE TABLE statement from your backup of one of the tables, e.g. g2_Item table.

- you said the tables were already UTF-8 on the new server, just the columns were not. right?
if so, we'll have to change a little code. waiting for your response.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Mon, 2006-11-06 00:00

Hello, not sure where or how to find that CREATE TABLE statement... Had a look in phpMyAdmin and could not see anything obvious. As for the database file itself, I don’t know how to open it. I tried Excel but no go...

In Row Statistics for g2_Item I see:
Format dynamic
Collation utf8_general_ci
Rows 707
Row length ø 43
Row size ø 117 B
Creation Nov 05, 2006 at 06:08 PM
Last update Nov 05, 2006 at 06:08 PM
Last check Nov 05, 2006 at 06:08 PM

Does that help?

If it does not, could you be a little more specific as to what I need to do? Thanks...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-11-06 00:12

you have a backup of your database, right? in that backup file, you'll find the create table statements. or how else did you move the db from the old host to the new host.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Mon, 2006-11-06 00:21

Yes, didn’t realize that that file was just a text document. Tried opening it with Excel (as it is a database) but no go... Anyway, opened it with a text editor and this is what I got.

CREATE TABLE g2_AccessMap (
g_accessListId int(11) NOT NULL default '0',
g_permission int(11) NOT NULL default '0',
g_userOrGroupId int(11) NOT NULL default '0',
PRIMARY KEY (g_accessListId,g_userOrGroupId),
KEY g2_AccessMap_83732 (g_accessListId),
KEY g2_AccessMap_18058 (g_permission),
KEY g2_AccessMap_48775 (g_userOrGroupId)
) TYPE=MyISAM;

Sorry to have created the extra bother for you!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-11-06 00:47

ok, i'd expected a DEFAULT CHARSET=utf8; at the end.
but i think that just means you started initially with a g2 version prior to g2.1.

so there are 3 cases:
a) your old db was not in utf8. in that case, the upgrade to g2.2 that you did should have fixed it.
did you clean the caches? it should do that during the upgrade.
please do this:
FAQ: How can I clear cached data?
and then clear the browser cache as well.

b) your old db was in utf8 but your new db didn't have the right collation set.
in that case, i'd add
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
to all create table statements in the backup file and then import the file again (before, drop the existing database).

c) the convert to utf8 task during the upgrade didn't do anything because the tables were already utf8 but the columns not.
in that case i'd replace the line
if (!$result || !preg_match('/utf8/i', $result)) {
with
if (true) {
in modules/core/CoreModuleExtras.inc (around line 2876).
and then run site admin -> maintenance -> "convert mysql database to utf8" and then clear the caches.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Mon, 2006-11-06 06:46

Thank you!

Tried your first fix (a) but no go, so am now about to try (b)...

As I am not sure of the terminology, so could you please confirm what I am about to do.

So this Create Table Statement:

DROP TABLE IF EXISTS g2_AccessMap;
CREATE TABLE g2_AccessMap (
g_accessListId int(11) NOT NULL default '0',
g_permission int(11) NOT NULL default '0',
g_userOrGroupId int(11) NOT NULL default '0',
PRIMARY KEY (g_accessListId,g_userOrGroupId),
KEY g2_AccessMap_83732 (g_accessListId),
KEY g2_AccessMap_18058 (g_permission),
KEY g2_AccessMap_48775 (g_userOrGroupId)
) TYPE=MyISAM;

should end up like this:

DROP TABLE IF EXISTS g2_AccessMap;
CREATE TABLE g2_AccessMap (
g_accessListId int(11) NOT NULL default '0',
g_permission int(11) NOT NULL default '0',
g_userOrGroupId int(11) NOT NULL default '0',
PRIMARY KEY (g_accessListId,g_userOrGroupId),
KEY g2_AccessMap_83732 (g_accessListId),
KEY g2_AccessMap_18058 (g_permission),
KEY g2_AccessMap_48775 (g_userOrGroupId)
) TYPE=MyISAM;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

I do the same for all the other Create Table Statements within the database, then delete the current database on the server and upload this new modified one...

Thanks again...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-11-06 11:55

correct, do that for all create table statements in your backup file.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Mon, 2006-11-06 13:57

Hello again...

When importing the modified database, I got the following error:

#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 ') ENGINE=InnoDB DEFAULT CHARSET=latin1' at line 1

What should I do?

Thanks....

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-11-06 14:55

sorry, 2 mistakes:
1. instead of ENGINE, use another keyword. that has changed in mysql 5.
2. instead of latin1, use utf8.

so it should be:

) ENGINE=InnoDB
/*!40100 DEFAULT CHARACTER SET utf8 */;

and not

) TYPE=MyISAM;
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Tue, 2006-11-07 01:07

Well, thanks to your help, we are getting there, but we are not quite there yet!

This time the import went well without any errors... I could then see the opening page of my gallery in English AND Japanese, yay!

However, when clicking on 6 of the 8 the albums I get a Database Error: An error has occurred while interacting with the database.

For the two that function, if I click on any of the pictures within the albums I get the same error message... ouch! So close yet so far...

Well, I await your learned suggestions!

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-11-07 04:32

:(

did you clear the cache after the import?
FAQ: How can I clear cached data?

if the problem persists, enable buffered debugging
FAQ: How to set/use Gallery in debug mode?

and add a link to your site such that we can see the problem.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Tue, 2006-11-07 14:24

Well, I hadn’t cleaned the caches, so I did that... Then when I went to my gallery I was taken to the 2.2 upgrader. I started the upgrade process and when it came to the Upgrade Plugins, I got the errors below (There were several pages of debug output, I only included the first few lines....)

So I restarted the upgrade, this time skipping the modules upgrade. I can ‘complete’ the upgrade process but then it takes me back to the beginning of the upgrade process... It is now an endless upgrade loop.

The gallery is located here: < http://www.cambodiakids.org/Gallery2/main.php>

Not sure what to do now! I tried setting the debug mode but then I just got a blank page when I went to the gallery...

Thanks again...

************************
Stack Trace:
Error (ERROR_STORAGE_FAILURE)

* in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 205 (gallerycoreapi::error)
* in modules/core/classes/GalleryStorage.class at line 293 (gallerystorageextras::loadentities)
* in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 71 (mysqlstorage::loadentities)
* in modules/core/classes/GalleryCoreApi.class at line 2247 (galleryentityhelper_simple::loadentitiesbyid)
* in upgrade/index.php at line 221 (gallerycoreapi::loadentitiesbyid)
* in upgrade/steps/UpgradeOtherModulesStep.class at line 42
* in upgrade/index.php at line 185 (upgradeothermodulesstep::processrequest)

Debug Output:

[1162908555] can't guarantee 300 -- extending!

(mysqlt): SET NAMES "utf8"

(mysqlt): SHOW TABLES

getParameter id.adminGroup for core plugin

(mysqlt):
SELECT
g2_PluginParameterMap.g_itemId,
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'module'
AND
g2_PluginParameterMap.g_pluginId = 'core'
AND
g2_PluginParameterMap.g_itemId = 0

*********************

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 00:26

> Then when I went to my gallery I was taken to the 2.2 upgrader

that doesn't make sense, does it? didn't you upgrade to 2.2 after importing the database again?

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 00:44

Here is an overview of what happened.

I had successfully upgraded to version 2.2 after your suggesting I change the bootstrap.inc file. But I could still not see Japanese correctly.

I then made the Create Table changes you had suggested:
() ENGINE=InnoDB
/*!40100 DEFAULT CHARACTER SET utf8 */;).

Immediately, without cleaning any caches or upgrading I went to my gallery and could finally see Japanese correctly but as I said earlier, when clicking on most of the albums, I got the ‘Database Error: An error has occurred while interacting with the database.‘

So then I cleared the cache. I had a look at my gallery and it took me to the updater! So I followed the updater steps, but the updater just goes in a loop...

Looking forward to any ideas you might have.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 00:53

this order does not make sense.

1. drop the database
2. delete g2data/cache/* but not g2data/cache/derivative/
3. import the fixed backup (the one with ENGINE=InnoDB, ...)
4. run the upgrade wizard to upgrade to 2.2

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 01:20

Thanks.

I have dropped the database and am right now about to delete the cache... I went to my gallery and added: lib/support/index.php... I got to a page that gives me the following choices...

Cached HTML pages
Albums and photo data
Module settings
Theme settings
Smarty templates
Temporary directory
Thumbnails and resizes (expensive to rebuild)

I don’t see anything about cache/derivative...

So I will wait for your instructions before I proceed... Previously I had checked everything except Thumbnails and resizes... Am I in the right place? What should I check?

Thanks...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 02:05

forget about the derivative cache (it's thumbs + resizes). just delete all but the derivative cache.

once you did that, please use your ftp client and verify that g2data/cache/ has no files in it anymore. g2data/derivative should still be there. all other things in g2data/cache should be empty (they can have subfolders, but no files).

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 02:51

Cleaned the cache, checked that all the folders (entity, module, theme) were empty (derivative contained data). I then imported the modified database and ran the updater. Same problem, just sends me in a loop. It tells me the core module is up to date, then in the next step (update plugins) I get error messages (several pages long, see below) if I choose upgrade selected modules. So I have to start over.

If I don’t update the plugins, it goes smoothly, but once the upgrade is finished, it takes me back to the first step!

As usual, I await your comments....

********
Upgrade Plugins
Stack Trace:

Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 205 (gallerycoreapi::error)
in modules/core/classes/GalleryStorage.class at line 293 (gallerystorageextras::loadentities)
in modules/core/classes/helpers/GalleryEntityHelper_simple.class at line 71 (mysqlstorage::loadentities)
in modules/core/classes/GalleryCoreApi.class at line 2247 (galleryentityhelper_simple::loadentitiesbyid)
in upgrade/index.php at line 221 (gallerycoreapi::loadentitiesbyid)
in upgrade/steps/UpgradeOtherModulesStep.class at line 42
in upgrade/index.php at line 185 (upgradeothermodulesstep::processrequest)
Debug Output:

[1162954051] can't guarantee 300 -- extending!

(mysqlt): SET NAMES "utf8"

(mysqlt): SHOW TABLES

getParameter id.adminGroup for core plugin

(mysqlt):
SELECT
g2_PluginParameterMap.g_itemId,
g2_PluginParameterMap.g_parameterName,
g2_PluginParameterMap.g_parameterValue
FROM
g2_PluginParameterMap
WHERE
g2_PluginParameterMap.g_pluginType = 'module'
AND
g2_PluginParameterMap.g_pluginId = 'core'
AND
g2_PluginParameterMap.g_itemId = 0

Etc. Etc. Etc.

********

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 03:24

please enable buffered debug mode, we need to see the actual mysql error.
FAQ: How to set/use Gallery in debug mode?

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 09:43

Hi,

In configure.php I replaced $gallery->setDebug(false); with $gallery->setDebug('buffered');

Uploaded it and then went to my gallery. Got taken to the updater again, with exactly the same situation. As If I select update the plugins I get several pages of debug messages and I cannot continue. If I don’t update the plugins I can go through all the steps but finally, get taken back to the first step of the updater.

Below is the last section of the debug message which had some red text. Here is the full debug message: <http://www.cambodiakids.org/galleryerror/pluginerror.rtf>:

getParameter _callbacks for replica plugin
getParameter _requiredCoreApi for replica plugin
getParameter _requiredModuleApi for replica plugin
readdir(Resource id #52)
closedir(Resource id #52)
mysqlt error: [1054: Unknown column 'g2_User.g_locked' in 'field list'] in
EXECUTE("SELECT g2_User.g_userName, g2_User.g_fullName,
g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language,
g2_User.g_locked, g2_Entity.g_id, g2_Entity.g_creationTimestamp,
g2_Entity.g_isLinkable, g2_Entity.g_linkId,
g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber,
g2_Entity.g_entityType, g2_Entity.g_onLoadHandlers FROM g2_User, g2_Entity
WHERE g2_User.g_id IN (14) AND g2_Entity.g_id=g2_User.g_id")

(mysqlt): SELECT g2_User.g_userName, g2_User.g_fullName,
g2_User.g_hashedPassword, g2_User.g_email, g2_User.g_language,
g2_User.g_locked, g2_Entity.g_id, g2_Entity.g_creationTimestamp,
g2_Entity.g_isLinkable, g2_Entity.g_linkId,
g2_Entity.g_modificationTimestamp, g2_Entity.g_serialNumber,
g2_Entity.g_entityType, g2_Entity.g_onLoadHandlers FROM g2_User, g2_Entity
WHERE g2_User.g_id IN (14) AND g2_Entity.g_id=g2_User.g_id

1054: Unknown column 'g2_User.g_locked' in 'field list'

adodb_mysqlt._execute(SELECT
g2_User.g_userName, g2_User.g_fullName, g2_User.g_hashedPassword,
g2_User.g_email, g2_User.g_language, g2_User.g_locked, ...) % line 863, file: adodb.inc.php
adodb_mysqlt.execute(SELECT g2_User.g_userName,
g2_User.g_fullName, g2_User.g_hashedPassword, g2_User.g_email,
g2_User.g_language, g2_User.g_locked, ..., Array[1]) % line 165, file: GalleryStorageExtras.class
gallerystorageextras.loadentities(Array[1]) % line 293, file: GalleryStorage.class
mysqlstorage.loadentities(Array[1]) % line 71, file: GalleryEntityHelper_simple.class
galleryentityhelper_simple.loadentitiesbyid(14) % line 2247, file: GalleryCoreApi.class
realpath(/home/globalpe/public_html/cambodiakids/Gallery2/modules/core/classes/../../../)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 11:05

so you successfully completed the upgrade core module step?

it's an unexpected issue...

> 1054: Unknown column 'g2_User.g_locked' in 'field list'

please check your database, "describe g2_User;".
and check "select * from g2_Schema where g_name = 'User';"

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 15:49

Yes, the core upgrade was successful...

I am really not sure what I should be checking...

The mySQL database name is cambodia_Gallery
The user name for that database is cambodia_danny

Should I replace g2_User with cambodia_danny in all instances in the database?

I am not sure what to check or do about g2_Schema...

Thanks again...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 15:53

no, please use phpmyadmin or whatever you use to administer and manage the database.
in that tool (e.g. phpmyadmin), execute these two queries and report here the results:
1. describe g2_User;
2. select * from g2_Schema where g_name = 'User';

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 16:43

I am using phpMyAdmin.

In phpMyAdmin I selected the database and then clicked on Querry.

In the ‘SQL query on database cambodia_Gallery2:’ window I type in describe g2_User; and then press Submit Querry. I then get an error message saying: You have to choose at least one column to display

What column do I need to diplay? I don’t have any experience with this part of phpMyAdmin...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-08 17:02

ok, in phpmyadmin, just click on the user table, then on "structure" and copy what you see or create a screenshot.

i either expect this:

 	Field  	Type  	Collation  	Attributes  	Null  	Default  	Extra  	Action
	g_id 	int(11) 			No 			Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_userName 	varchar(32) 	utf8_general_ci 		No 			Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_fullName 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_hashedPassword 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_email 	varchar(255) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_language 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_locked 	int(1) 			Yes 	0 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext

or this:

 	Field  	Type  	Collation  	Attributes  	Null  	Default  	Extra  	Action
	g_id 	int(11) 			No 			Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_userName 	varchar(32) 	utf8_general_ci 		No 			Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_fullName 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_hashedPassword 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_email 	varchar(255) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
	g_language 	varchar(128) 	utf8_general_ci 		Yes 	NULL 		Browse distinct values 	Change 	Drop 	Primary 	Unique 	Index 	Fulltext
 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-08 23:51

Hello,

Followed your instructions and have included a screen shot as an attachment.

Hope it helps sort this out!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-11-09 02:50

thanks.
so you went successfully through the the core installation but it did not change the User table. :/
weird.

please manually add the g_locked column to the user table.

1. in phpmyadmin, go the User table
2. in the structure view, click "Go" to add one field
3. in field, enter "g_locked", as data type choose INT, as length enter 1 in default enter 0
4. hit save

done

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-10 12:21

Thank you Valiant, but we are still not there yet...

Carried out the above and this time things went a little better to a point. Just one of the modules could not be upgraded this time... Here is the message:

Unable to upgrade the Thumbnail Manager module Unable to upgrade the Core module

Part of the debug menu is below.

Anyway, so I restarted the Updater and skipped updating the plugins. When I got taken to the gallery the debug window was there with several pages of info (see GALLERY DEBUG WINDOW ERRORS below...

I am not seeming to have too much luck with this! I tried cleaning the cache several times, but to no avail.

Anyway, I hope something can be done... Thank you for your patience!

*********************
Upgrade Plugins
Upgraded the URL Rewrite module successfully
Stack Trace:

Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 953 (gallerycoreapi::error)
in modules/core/classes/GalleryStorage.class at line 488 (gallerystorageextras::execute)
in modules/thumbnail/ThumbnailModuleExtras.inc at line 245 (mysqlstorage::execute)
in modules/thumbnail/module.inc at line 50 (thumbnailmoduleextras::upgrade)
in modules/core/classes/GalleryModule.class at line 154 (thumbnailmodule::upgrade)
in upgrade/steps/UpgradeOtherModulesStep.class at line 76 (thumbnailmodule::installorupgrade)
in upgrade/index.php at line 185 (upgradeothermodulesstep::processrequest)
Error (ERROR_BAD_PLUGIN) : Unknown module version 1.1.20
in modules/core/CoreModuleExtras.inc at line 2092 (gallerycoreapi::error)
in modules/core/module.inc at line 429 (coremoduleextras::upgrade)
in modules/core/classes/GalleryModule.class at line 154 (coremodule::upgrade)
in upgrade/steps/UpgradeOtherModulesStep.class at line 76 (coremodule::installorupgrade)
in upgrade/index.php at line 185 (upgradeothermodulesstep::processrequest)

**********************

GALLERY DEBUG WINDOW ERRORS:

Database Error
An error has occurred while interacting with the database.

Back to the Gallery

Error Detail +
Debug Output

file_exists(/home/globalpe/CCHomePhotos/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
(mysqlt): SET NAMES "utf8"
file_exists(/home/globalpe/CCHomePhotos/cache/module/_all/0/0/GalleryStorage_describeMap.inc) file_exists(/home/globalpe/CCHomePhotos/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
(mysqlt): SELECT g2_PluginMap.g_pluginId, g2_PluginMap.g_active FROM g2_PluginMap WHERE g2_PluginMap.g_pluginType = 'module'
opendir(/home/globalpe/public_html/cambodiakids/Gallery2/modules/) readdir(Resource id #26) readdir(Resource id #26) readdir(Resource id #26) is_dir(/home/globalpe/public_html/cambodiakids/Gallery2/modules/albumselect) file_exists(/home/globalpe/public_html/cambodiakids/Gallery2/modules/albumselect/module.inc) getParameter _version for albumselect plugin
(mysqlt): SELECT g2_PluginParameterMap.g_itemId, g2_PluginParameterMap.g_parameterName, g2_PluginParameterMap.g_parameterValue FROM g2_PluginParameterMap WHERE g2_PluginParameterMap.g_pluginType = 'module' AND g2_PluginParameterMap.g_pluginId = 'albumselect' AND g2_PluginParameterMap.g_itemId = 0

ETC ETC...

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-11-10 13:23

> Unable to upgrade the Core module

that is very bad.

the core module should be upgraded in the "Upgrade core module step", there should be no attempt to upgrade it in the "Upgrade other modules" step since it should already have been upgraded.

> Error (ERROR_BAD_PLUGIN) : Unknown module version 1.1.20

when you look at modules/core/module.inc, what does it say in function CoreModule() { ... $this->setVersion ?
and what version is in g2data/versions.dat?

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-10 16:02

This is what I get for CoreModule in module.inc:

$this->setId('core');
$this->setName($gallery->i18n('Core'));
$this->setGalleryVersion('2.2-svn');

In Version.dat I see:

1.1.20
2.2-svn

Thank you!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-11-10 16:13

is your gallery online? what's the url? i'd like to inspect your module.inc and CoreModuleExtras.inc files.

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-10 16:48
 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Fri, 2006-11-10 23:50

I didn’t read your post correctly. Attached are the files you would like to inspect.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-11-11 17:47

Thanks, actually I can see the files through your website (no need to attach the zip).

I'm puzzled. So versions.dat and module.inc as well as CoreModuleExtras.inc are for v 1.1.20.
Please check the version in the database:
SELECT g_parameterValue FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version';

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sun, 2006-11-12 00:14

Hello again,

Well, I am not completely sure how to carry out your instructions...

First I went to g2_PluginParamaeterMap. I noticed an ‘error’ message:

UNIQUE and INDEX keys should not both be set for column `g_pluginType`
More than one INDEX key was created for column `g_pluginType`

Looking in the database I was not sure where to find what you want. If I have not included what you need, could you explain how to find it in more detail or perhaps I could send you a copy of the database...

Browsing on g_parameterValue I get the following:

Full Texts
Rows g_parameterValue
25
1 %c
2 %x
1 /Gallery2/
1 /usr/bin/unzip
1 /usr/bin/zip
1 /usr/local/bin/
21 0
20 1
1 1.0.0
1 1.0.1
1 1.0.10
3 1.0.2
9 1.0.3
6 1.0.4
3 1.0.5
7 1.0.6
1 1.0.7
1 1.0.8
1 1.0.9
4 1.1.0
1 1.1.0.1
3 1.1.2
1 1.1.6
3 10
1 120
2 14
1 1814400
1 1849
1 1852

For g_pluginId I get:

38 core

For g_paramatername I don’t see anything related to _version:

Full Texts
Rows g_parameterName
1 acceleration
1 accessList
1 activeRules
1 addOption
1 adminsubject
1 albumBlocks
33 albumFrame
1 allowAlbumRating
1 allowAlbums
1 allowCommentsAlbum
1 allowCommentsPhoto
1 allowConfigurableFeed
1 allowEmptyReferer
1 allowPhotos
1 allowPhotosRecurse
1 allowSimpleFeed
1 autoPermalink
1 bmptopnm
1 canViewEmailAddress
1 canViewMembersModule
1 cmykSupport
1 colorpack
32 columns
1 comments.latest
1 comments.show
1 confirmation
1 cookie.domain
1 cookie.path
1 create
1 days.new

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Wed, 2006-11-15 00:10

Hello again!

I have gone through your instructions. This time I tried a different way...

Here is what I did... Please correct me as need be, if you don’t mind.

1. I go to phpMyAdmin and in the database, click on g2_PluginParameterMap.

2. Within that window, I put a check marks next to g_parameterValue, g_pluginId and g_parameterName and click Browse.

Here is what I get:

Full Texts g_pluginId g_parameterName g_parameterValue
Edit Delete albumselect sort manual
Edit Delete albumselect treeCloseSameLevel 0
Edit Delete albumselect treeCookies 1
Edit Delete albumselect treeExpandCollapse 1
Edit Delete albumselect treeIcons 1
Edit Delete albumselect treeLines 1
Edit Delete albumselect _callbacks getSiteAdminViews|registerEventListeners
Edit Delete albumselect _requiredCoreApi 7,5
Edit Delete albumselect _requiredModuleApi 3,0
Edit Delete albumselect _version 1.0.4
Edit Delete archiveupload removeMeta 1
Edit Delete archiveupload unzipPath /usr/bin/unzip
Edit Delete archiveupload _callbacks getSiteAdminViews
Edit Delete archiveupload _requiredCoreApi 7,4
Edit Delete archiveupload _requiredModuleApi 3,0
Edit Delete archiveupload _version 1.0.5
Edit Delete captcha failCount-core.UserLogin.frendoy 1
Edit captcha failCount-core.UserLogin.吉川美雄 2
Edit Delete captcha failedAttemptThreshold 3
Edit Delete captcha _callbacks getSiteAdminViews
Edit Delete captcha _requiredCoreApi 7,1
Edit Delete captcha _requiredModuleApi 3,0
Edit Delete captcha _version 1.1.2
Edit Delete colorpack _callbacks
Edit Delete colorpack _requiredCoreApi 7,0
Edit Delete colorpack _requiredModuleApi 3,0
Edit Delete colorpack _version 1.0.3
Edit Delete comment comments.latest 1
Edit Delete comment comments.show 10
Edit Delete comment validation.level OFF

 
DamienA
DamienA's picture

Joined: 2003-05-25
Posts: 203
Posted: Sat, 2006-11-18 17:53

I have not had a reply so I wonder if anyone else help me out with this problem. The gallery related to this particular problem has been down for several weeks now... It is a site I am building as a volunteer to support homeless children in Cambodia...

Any assistance would be greatly appreciated.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-11-19 02:20

please execute this SQL query...

SELECT * FROM g2_PluginParameterMap WHERE g_pluginId = 'core' and g_parameterName = '_version';