NO login after successful upgrade to 2.3.1: Undefined map: FailedLoginsMap + Unknown column 'g_createSql' in 'field list' +

hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sat, 2010-07-31 16:14

Hi all

any help is appreciated

Error (ERROR_MISSING_VALUE) : Undefined map: FailedLoginsMap

HERE in the forum published solutions lead to new errors:

- Unknown column 'g_createSql' in 'field list'
- Unknown column 'g_info' in 'field list'

since more than 6 months I am attempting repeated times to upgrade from a perfectly running g2.1.1a to 2.3.1. always with same result.

I googled and read FAQ and all relevant forum posts like

http://gallery.menalto.com/node/84150
http://gallery.menalto.com/node/84352
http://gallery.menalto.com/node/84351
and others

the solutions published fail to work for me with a.m. new errors surfacing!

before upgrade I do full maintenance, empty cache, login-logout, empty browser cookies, browser cache, etc

!! upgrade smooth with zero errors

!! after upgrade surfing gallery pages, images, resizes = zero problem, all seems to work fine from a surfers point of view.

admin login on upgraded system IMPOSSIBLE ( I have only 1 (admin)login - no users )

please note that my gallery2 prefix is in config.php is

$storeConfig['tablePrefix'] = 'gallery2_main_';
$storeConfig['columnPrefix'] = 'gallery_main_';

and NOT g2_ / g_

gallery2 however uses for most admin links / admin tasks always links with g2_

it seems that the gallery2_main_ prefix only is used for added content.
this configured prefix comes from the original first install some 4 years ago when I planned to run 2 galleries.

gallery2_main_ is successfully used on my high traffic site many years with zero problems. A complete list of all current tables is at the BOTTOM of this page.

solutions tested:
*****************

INSERT INTO `g2_Schema` (`g_name`, `g_major`, `g_minor`, `g_createSql`, `g_pluginId`, `g_type`, `g_info`) VALUES
('FailedLoginsMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXFailedLoginsMap(n DB_COLUMN_PREFIXuserName varchar(32) NOT NULL,n DB_COLUMN_PREFIXcount int(11) NOT NULL,n DB_COLUMN_PREFIXlastAttempt int(11) NOT NULL,n PRIMARY KEY(DB_COLUMN_PREFIXuserName)n) DB_TABLE_TYPEn/*!40100 DEFAULT CHARACTER SET utf8 */;nnINSERT INTO DB_TABLE_PREFIXSchema (n DB_COLUMN_PREFIXname,n DB_COLUMN_PREFIXmajor,n DB_COLUMN_PREFIXminorn) VALUES(''FailedLoginsMap'', 1, 0);nn', 'core', 'map', 'a:1:{s:15:"FailedLoginsMap";a:3:{s:8:"userName";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:5:"count";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:11:"lastAttempt";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}}}');

results in ERROR:
*****************
#1054 - Unknown column 'g_createSql' in 'field list'

another test query published in a forum thread HERE:
----------------------------------------------------

select g_info from g2_Schema where g_name='FailedLoginsMap';

ERROR 1054 (42S22):
Unknown column 'g_info' in 'field list'

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

system data

Upgrade from gallery 2.1.1a to 2.3.1

Last Run Details:

Gallery version = 2.1.1 core 1.1.0.1
PHP version = 5.3.2 apache2handler
Webserver = God is Love
Database = mysql 5.1.46-log, lock.system=flock
Toolkits = Exif, Getid3, NetPBM, Thumbnail, ImageMagick
Acceleration = none/900, none/900
Operating system = Linux kriyayoga3 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64
Default theme = matrix
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100506 SUSE/3.5.10-0.1.1 Firefox/3.5.10 GTB7.1

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

to give you system data AFTER upgrade impossible - because login impossible!

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

Error Detail -
Error (ERROR_MISSING_VALUE) : Undefined map: FailedLoginsMap

* in modules/core/classes/GalleryStorage.class at line 1257 (GalleryCoreApi::error)
* in modules/core/classes/GalleryStorage.class at line 1249 (GalleryStorage::describeMap)
* in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1067 (GalleryStorage::describeMap)
* in modules/core/classes/GalleryStorage.class at line 534 (GalleryStorageExtras::removeMapEntry)
* in modules/core/classes/GalleryCoreApi.class at line 2935 (GalleryStorage::removeMapEntry)
* in modules/core/UserRecoverPasswordAdmin.inc at line 93 (GalleryCoreApi::removeMapEntry)
* in index.php at line 250 (UserRecoverPasswordAdminController::handleRequest)
* in index.php at line 104
* in index.php at line 88

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

Debug Output

file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/rewrite/classes/parsers/modrewrite/ModRewriteUrlGenerator.class) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/module/rewrite/0/0/0.inc) getParameter shortUrls for rewrite plugin getParameter session.lifetime for core plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/module/core/0/0/0.inc) getParameter session.inactivityTimeout for core plugin (mysql): SET NAMES "utf8" (mysql): SELECT gallery2_main_Schema.gallery_main_info FROM gallery2_main_PluginMap, gallery2_main_Schema WHERE gallery2_main_PluginMap.gallery_main_pluginId = gallery2_main_Schema.gallery_main_pluginId AND gallery2_main_Schema.gallery_main_type = 'map' AND gallery2_main_PluginMap.gallery_main_active = 1 (mysql): SELECT gallery_main_userId, gallery_main_remoteIdentifier, gallery_main_creationTimestamp, gallery_main_modificationTimestamp, gallery_main_data FROM gallery2_main_SessionMap WHERE gallery_main_id='cc39a33246582f90728567740511cac5' controller core.UserRecoverPasswordAdmin, view Loading plugin core Class not defined, trying to include it. file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/core/module.inc) core plugin successfully instantiated file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/versions.dat) file(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/versions.dat, ) getParameter modrewrite.galleryLocation for rewrite plugin [1280562413] can't guarantee 5 -- extending! file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0/5.inc) Loading plugin core core plugin successfully instantiated Check the version of the core plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the core plugin is ok file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/core/UserRecoverPasswordAdmin.inc) is_readable(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/login.txt) (mysql): SELECT gallery2_main_User.gallery_main_id FROM gallery2_main_User WHERE gallery2_main_User.gallery_main_userName = 'hans' file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0/6.inc) getParameter lock.system for core plugin fopen(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/locks/6, wb+, 0) flock(Resource id #56, 6, ) (mysql): SELECT gallery_main_id, gallery_main_entityType FROM gallery2_main_Entity WHERE gallery_main_id IN (6) (mysql): SELECT gallery2_main_Schema.gallery_main_info FROM gallery2_main_PluginMap, gallery2_main_Schema WHERE gallery2_main_PluginMap.gallery_main_pluginId = gallery2_main_Schema.gallery_main_pluginId AND gallery2_main_Schema.gallery_main_type = 'entity' AND gallery2_main_PluginMap.gallery_main_active = 1 (mysql): SELECT gallery2_main_User.gallery_main_userName, gallery2_main_User.gallery_main_fullName, gallery2_main_User.gallery_main_hashedPassword, gallery2_main_User.gallery_main_email, gallery2_main_User.gallery_main_language, gallery2_main_User.gallery_main_locked, gallery2_main_Entity.gallery_main_id, gallery2_main_Entity.gallery_main_creationTimestamp, gallery2_main_Entity.gallery_main_isLinkable, gallery2_main_Entity.gallery_main_linkId, gallery2_main_Entity.gallery_main_modificationTimestamp, gallery2_main_Entity.gallery_main_serialNumber, gallery2_main_Entity.gallery_main_entityType, gallery2_main_Entity.gallery_main_onLoadHandlers FROM gallery2_main_User, gallery2_main_Entity WHERE gallery2_main_User.gallery_main_id IN (6) AND gallery2_main_Entity.gallery_main_id=gallery2_main_User.gallery_main_id file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/core/classes/helpers/GalleryItemHelper_medium.class) (mysql): DELETE FROM gallery2_main_CacheMap WHERE gallery_main_itemId IN (6) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/hidden/module.inc) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/imageblock/classes/ImageBlockHelper.class) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/sizelimit/module.inc) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/albumselect/module.inc) (mysql): UPDATE gallery2_main_Entity SET gallery_main_modificationTimestamp=1280562413,gallery_main_serialNumber=8 WHERE gallery_main_id=6 AND gallery_main_serialNumber=7 (mysql): UPDATE gallery2_main_User SET gallery_main_hashedPassword='rJBd6238e63f5008d43490422116e163cb38' WHERE gallery_main_id=6 file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0) is_dir(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0) is_dir(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0) getParameter permissions.file for core plugin getParameter permissions.directory for core plugin rename(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0/6.incWmbI5k, /kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0/6.inc) fclose(Resource id #56) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/locks/6) unlink(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/locks/6) (mysql): SELECT gallery2_main_Schema.gallery_main_info FROM gallery2_main_Schema WHERE gallery2_main_Schema.gallery_main_type = 'map' getParameter id.adminGroup for core plugin (mysql): SELECT gallery_main_userId FROM gallery2_main_UserGroupMap WHERE gallery_main_userId=5 AND gallery_main_groupId=3 LIMIT 1 getParameter default.theme for core plugin Loading plugin matrix Class not defined, trying to include it. file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/themes/matrix/theme.inc) matrix plugin successfully instantiated Check the version of the matrix plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/theme/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc) The version of the matrix plugin is ok Loading plugin core core plugin successfully instantiated Check the version of the core plugin The version of the core plugin is ok getParameter smarty.compile_check for core plugin getParameter id.adminGroup for core plugin realpath(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/core/classes/../../../) realpath(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/) getParameter id.rootAlbum for core plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/entity/0/0/7.inc) getParameter default.theme for core plugin Loading plugin matrix matrix plugin successfully instantiated Check the version of the matrix plugin The version of the matrix plugin is ok file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/smarty/templates_c/%%3215490771/matrix) is_dir(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/smarty/templates_c/%%3215490771/matrix) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/smarty/templates_c/%%3215490771/matrix) is_writeable(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/smarty/templates_c/%%3215490771/matrix) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/smarty/templates_c/%%3215490771/matrix/v_14) getParameter modrewrite.galleryLocation for rewrite plugin file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/g2_data/cache/theme/_all/localUrlMap.txt) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/lib/javascript/local/BlockToggle.js) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/modules/core/../../themes/matrix/local/theme.css) file_exists(/kunden/homepages/33/d106645101/htdocs/photography/photo_gallery/themes/matrix/local/theme.css)

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

mysql> show tables; !!! after upgrade to 2.3.1 !!!
+-------------------------------------+
| Tables_in_photo_gallery |
+-------------------------------------+
| g2_AccessMap |
| g2_AccessSubscriberMap |
| g2_AlbumItem |
| g2_AnimationItem |
| g2_CacheMap |
| g2_ChildEntity |
| g2_CustomFieldMap |
| g2_DataItem |
| g2_Derivative |
| g2_DerivativeImage |
| g2_DerivativePrefsMap |
| g2_DescendentCountsMap |
| g2_Entity |
| g2_ExifPropertiesMap |
| g2_ExternalIdMap |
| g2_FactoryMap |
| g2_FailedLoginsMap |
| g2_FileSystemEntity |
| g2_Getid3PropsMap |
| g2_Group |
| g2_ImageBlockCacheMap |
| g2_ImageBlockDisabledMap |
| g2_Item |
| g2_ItemAttributesMap |
| g2_LinkItem |
| g2_Lock |
| g2_MaintenanceMap |
| g2_MimeTypeMap |
| g2_MovieItem |
| g2_MultiLangItemMap |
| g2_PermalinksMap |
| g2_PermissionSetMap |
| g2_PhotoItem |
| g2_PluginMap |
| g2_PluginPackageMap |
| g2_PluginParameterMap |
| g2_RatingCacheMap |
| g2_RatingMap |
| g2_RecoverPasswordMap |
| g2_RssMap |
| g2_Schema |
| g2_SequenceId |
| g2_SequenceLock |
| g2_SessionMap |
| g2_ThumbnailImage |
| g2_TkOperatnMap |
| g2_TkOperatnMimeTypeMap |
| g2_TkOperatnParameterMap |
| g2_TkPropertyMap |
| g2_TkPropertyMimeTypeMap |
| g2_UnknownItem |
| g2_User |
| g2_UserGroupMap |
| g2_WatermarkImage |
| gallery2_main_AccessMap |
| gallery2_main_AccessSubscriberMap |
| gallery2_main_AlbumItem |
| gallery2_main_AnimationItem |
| gallery2_main_CacheMap |
| gallery2_main_ChildEntity |
| gallery2_main_CustomFieldMap |
| gallery2_main_DataItem |
| gallery2_main_Derivative |
| gallery2_main_DerivativeImage |
| gallery2_main_DerivativePrefsMap |
| gallery2_main_DescendentCountsMap |
| gallery2_main_Entity |
| gallery2_main_EventLogMap |
| gallery2_main_ExifPropertiesMap |
| gallery2_main_ExternalIdMap |
| gallery2_main_FactoryMap |
| gallery2_main_FailedLoginsMap |
| gallery2_main_FileSystemEntity |
| gallery2_main_Getid3PropsMap |
| gallery2_main_Group |
| gallery2_main_ImageBlockCacheMap |
| gallery2_main_ImageBlockDisabledMap |
| gallery2_main_Item |
| gallery2_main_ItemAttributesMap |
| gallery2_main_ItemHiddenMap |
| gallery2_main_LinkItem |
| gallery2_main_Lock |
| gallery2_main_MaintenanceMap |
| gallery2_main_MimeTypeMap |
| gallery2_main_MovieItem |
| gallery2_main_MultiLangItemMap |
| gallery2_main_PermissionSetMap |
| gallery2_main_PhotoItem |
| gallery2_main_PluginMap |
| gallery2_main_PluginPackageMap |
| gallery2_main_PluginParameterMap |
| gallery2_main_RatingCacheMap |
| gallery2_main_RatingMap |
| gallery2_main_RecoverPasswordMap |
| gallery2_main_RssMap |
| gallery2_main_Schema |
| gallery2_main_SequenceEventLog |
| gallery2_main_SequenceId |
| gallery2_main_SequenceLock |
| gallery2_main_SessionMap |
| gallery2_main_ThumbnailImage |
| gallery2_main_TkOperatnMap |
| gallery2_main_TkOperatnMimeTypeMap |
| gallery2_main_TkOperatnParameterMap |
| gallery2_main_TkPropertyMap |
| gallery2_main_TkPropertyMimeTypeMap |
| gallery2_main_UnknownItem |
| gallery2_main_User |
| gallery2_main_UserGroupMap |
| gallery2_main_WatermarkImage |
+-------------------------------------+
110 rows in set (0.00 sec)

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

any help appreciated to solve this persistent login problem

hans

Kriya Yoga, God and Love | Solutions | Philippine islands

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6550
Posted: Sat, 2010-07-31 16:22
Quote:
solutions tested:
*****************

INSERT INTO `g2_Schema` (`g_name`, `g_major`, `g_minor`, `g_createSql`, `g_pluginId`, `g_type`, `g_info`) VALUES
('FailedLoginsMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXFailedLoginsMap(n DB_COLUMN_PREFIXuserName varchar(32) NOT NULL,n DB_COLUMN_PREFIXcount int(11) NOT NULL,n DB_COLUMN_PREFIXlastAttempt int(11) NOT NULL,n PRIMARY KEY(DB_COLUMN_PREFIXuserName)n) DB_TABLE_TYPEn/*!40100 DEFAULT CHARACTER SET utf8 */;nnINSERT INTO DB_TABLE_PREFIXSchema (n DB_COLUMN_PREFIXname,n DB_COLUMN_PREFIXmajor,n DB_COLUMN_PREFIXminorn) VALUES(''FailedLoginsMap'', 1, 0);nn', 'core', 'map', 'a:1:{s:15:"FailedLoginsMap";a:3:{s:8:"userName";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:5:"count";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:11:"lastAttempt";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}}}');

You'll have to edit that insert to reflect your prefix schema ie.

INSERT INTO `gallery2_main_Schema` (`gallery_main_name`, `gallery_main_major`, `gallery_main_minor`, `gallery_main_createSql`, `gallery_main_pluginId`, `gallery_main_type`, `gallery_main_info`) VALUES
('FailedLoginsMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXFailedLoginsMap(n DB_COLUMN_PREFIXuserName varchar(32) NOT NULL,n DB_COLUMN_PREFIXcount int(11) NOT NULL,n DB_COLUMN_PREFIXlastAttempt int(11) NOT NULL,n PRIMARY KEY(DB_COLUMN_PREFIXuserName)n) DB_TABLE_TYPEn/*!40100 DEFAULT CHARACTER SET utf8 */;nnINSERT INTO DB_TABLE_PREFIXSchema (n DB_COLUMN_PREFIXname,n DB_COLUMN_PREFIXmajor,n DB_COLUMN_PREFIXminorn) VALUES(''FailedLoginsMap'', 1, 0);nn', 'core', 'map', 'a:1:{s:15:"FailedLoginsMap";a:3:{s:8:"userName";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:5:"count";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:11:"lastAttempt";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}}}');

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sat, 2010-07-31 18:10

sorry that I forgot to mention that I did that already
any and every published solution or query has been tested on BOTH prefix

as mentioned above

i have found NO single link ( URL ) on my entire site that actually points to a table with the configured

gallery2_main_
gallery_main_

and

g2_
g_

prefix tables:

always same errors for BOTH table prefix

ERROR 1054 (42S22): Unknown column 'gallery_main_createSql' in 'field list'

ALL my URLs point strictly to g2_ tables - but from table size I know that at least a few gallery2_main_ tables are actually used. apparently only those for content ( texts, captions, etc ). but that way the gallery was/still is running perfectly with version g2.1.1a

examples of g2_ use can be seen on my years long running g2.1.1a install
http://www.kriyayoga.com/photography/photo_gallery/index.php

top of page:
when you move mouse over "login" link or "next" - "last" link - same for all other navigation links to album pages, the URL shown always is a g2_ table - never a gallery2_main_

same after admin login ALL admin/maintenance links are g2_ prefix tables

but any way I always test solutions found here in the forum on BOTH tables - always with same errors

hans
Kriya Yoga, God and Love | Solutions | Philippine islands

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6550
Posted: Sat, 2010-07-31 18:35

using phpMyAdmin or similar, export your db to sql - this will be your backup.
do a second time just the gallery2_main_ tables - this will be our work copy.

using an advanced editor (aptana, notepad++) do a mass find/replace for:
gallery2_main_ to g2_
gallery_main_ to g_
Save
Clear the db tables via phpMyAdmin
import our altered work copy.
edit gallery2/config.php to reflect your new prefixes.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sat, 2010-07-31 21:29

done as said - now we have 1 single g2_ / g_ prefix db :)

however we have still exactly the same situation:

Error (ERROR_MISSING_VALUE) : Undefined map: FailedLoginsMap

* in modules/core/classes/GalleryStorage.class at line 1257 (GalleryCoreApi::error)
* in modules/core/classes/GalleryStorage.class at line 1249 (GalleryStorage::describeMap)
* in modules/core/classes/GalleryStorage.class at line 572 (GalleryStorage::describeMap)
* in modules/core/classes/GalleryCoreApi.class at line 2912 (GalleryStorage::getMapEntry)
* in modules/core/classes/helpers/GalleryUserHelper_medium.class at line 425 (GalleryCoreApi::getMapEntry)
* in modules/core/classes/GalleryCoreApi.class at line 3182 (GalleryUserHelper_medium::isDisabledUsername)
* in modules/core/UserLogin.inc at line 74 (GalleryCoreApi::isDisabledUsername)
* in index.php at line 250 (UserLoginController::handleRequest)
* in index.php at line 104
* in index.php at line 88

BTW

I tested that option a few days ago since getting a clean 1-prefix db was a desired side-effect of my current upgrade. I was unsure if this procedure correct - but since you told me so, i assume that the option was correct. I did it on the production server - and suddenly realized that I NO longer could log-OUT ...
hence I restored the db again with dual prefix.

the precisely same login-error also occurs if I recreate the admin password using this below link with login.txt file:

index.php?g2_view=core.UserAdmin&g2_subView=core.UserRecoverPasswordAdmin

Can I create an empty clean full install of g2.3.1
then export ( ? which ? ) tables or files to be used / imported into the production db from the upgraded empty gallery231 ?

or

how to get / insert what is missing?

your help is highly welcome and appreciated!

hans
Kriya Yoga, God and Love | Solutions | Philippine islands

 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sat, 2010-07-31 22:03

I also just noticed that on the left page side i have a new error:

WARNING: block core.NavigationLinks doesn't exist.

but i guess that is something that could be recreated by deleting/reinstalling the correct (? which ) module later when login possible again.

hans
Kriya Yoga, God and Love | Solutions | Philippine islands

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6550
Posted: Sat, 2010-07-31 22:24

for each table, you need a corresponding entry in g2_Schema
these are all of them, but only insert the ones you need.

and if you need to rename the prefix, be my guest.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

AttachmentSize
g2_Schema.sql_.txt48.86 KB
 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sun, 2010-08-01 01:18

Lots thanks for your valuable, precise and complete help.
As a mysql newbie I appreciate your complete syntax - your g2_Schema.sql_.txt is saved on my laptop for later reference

:) for NOW ALL is working already :)

EXCEPT
one tiny major problem left. after all the joy of login and successful maintenance, I logged OUT without having disabled maintenance mode on the maintenance page in the site admin section ...
and now I get redirected automatically each time I want to log in or load the index.php page of the gallery.

there are 2 modes still active NOW:

- debug mode
- maintenance mode

however

BOTH modes are deactivated in config.php are correctly disabled - the maintenance more ONLY was activated in admin mode from within the gallery and NOT by editing the config.php !!

in config.php I have:

$gallery->setDebug('false');

$gallery->setConfig('mode.maintenance', false);

for the main fix however - the solving of the original error,
the only one table I needed to insert was:

INSERT INTO `g2_Schema` (`g_name`, `g_major`, `g_minor`, `g_createSql`, `g_pluginId`, `g_type`, `g_info`) VALUES
('FailedLoginsMap', 1, 0, 'CREATE TABLE DB_TABLE_PREFIXFailedLoginsMap(n DB_COLUMN_PREFIXuserName varchar(32) NOT NULL,n DB_COLUMN_PREFIXcount int(11) NOT NULL,n DB_COLUMN_PREFIXlastAttempt int(11) NOT NULL,n PRIMARY KEY(DB_COLUMN_PREFIXuserName)n) DB_TABLE_TYPEn/*!40100 DEFAULT CHARACTER SET utf8 */;nnINSERT INTO DB_TABLE_PREFIXSchema (n DB_COLUMN_PREFIXname,n DB_COLUMN_PREFIXmajor,n DB_COLUMN_PREFIXminorn) VALUES(''FailedLoginsMap'', 1, 0);nn', 'core', 'map', 'a:1:{s:15:"FailedLoginsMap";a:3:{s:8:"userName";a:3:{s:4:"type";i:2;s:4:"size";i:1;s:7:"notNull";b:1;}s:5:"count";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}s:11:"lastAttempt";a:3:{s:4:"type";i:1;s:4:"size";i:2;s:7:"notNull";b:1;}}}');

then i needed to re-establish the password since all login procedure got somehow lost.

the password restore works with the link

index.php?g2_view=core.UserAdmin&g2_subView=core.UserRecoverPasswordAdmin

that uses the file login.txt

after that all login perfect.

I went through a full cycle of maintenance to test all functionalities and links, including resize of all pictures, db backup, just all worked

except that i forgot to disable maintenance mode ... and locked myself out

I see NO redirect to the set /maintenance.html in .htaccess ...

hans
Kriya Yoga, God and Love | Solutions | Philippine islands

 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sun, 2010-08-01 02:03

Google helped

I could re-login with this URL

index.php?g2_controller=core.UserLogin&g2_form[formName]=UserLogin&g2_form[action][login]=Login&g2_form[username]=usernamehere&g2_form[password]=secretpasswordhere

to deactivate the maintenance mode
now I can log in and out again

but the debug mode still remains active while as shown above in config.php debug is OFF

$gallery->setDebug('false');

and i have deleted the debug plugin
and still get while logged in each time a

Debug Redirect
Not automatically redirecting you to the next page because we're in debug mode

hans
Kriya Yoga, God and Love | Solutions | Philippine islands

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6550
Posted: Sun, 2010-08-01 02:35
 
hans51
hans51's picture

Joined: 2006-07-07
Posts: 99
Posted: Sun, 2010-08-01 12:15
suprsidr wrote:
try $gallery->setDebug(false); instead.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

that solved the problem completely for me

tks again

to complete the System information:

Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.2 apache2handler
Webserver = God is Love
Database = mysql 5.1.46-log, lock.system=flock
Toolkits = Exif, Getid3, NetPBM, Thumbnail, ImageMagick, LinkItemToolkit
Acceleration = none/900, none/900
Operating system = Linux kriyayoga2 2.6.34-12-default #1 SMP 2010-06-29 02:39:08 +0200 x86_64
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.5.11-0.1.1 Firefox/3.5.11 GTB7.1
Rows in GalleryAccessMap table = 59
Rows in GalleryAccessSubscriberMap table = 2877
Rows in GalleryUser table = 2
Rows in GalleryItem table = 2847
Rows in GalleryAlbumItem table = 26
Rows in GalleryCacheMap table = 0

For all those who also want or have to rename the table prefix on a .sql backup file, here a simple and most efficient way to do this correction directly on the server - logged in via SSH:

cd to your gallery_backup_db.sql directory,
then look for the exact file-name of your backup_db.sql to work on and replace my below example "gallery_backup_db.sql" with your real .sql file name.

I have never tested it on the .xml backup files yet!

then look at the search/replace string syntax below: 's/gallery2_main_/g2_/g'

3 slahes /// are the core of the search replace function used.

between first / and second / is the string to search for and between 2nd / and 3rd / is the string to replace the first string. after every run of below ONE-line code, a copy is saved as gallery_backup_db.sql~
if you run the find replace twice ( for table prefix and column prefix ) - then your original is gone for ever!
so better make an extra backup-copy just in case things go really wrong or you mistype.

I first empty cache - do a full gallery maintenance to make the backup.sql as slim as possible!

a 9 MB .sql file is processed in less than a second - without download/upload.

Quote:
find -name 'gallery_backup_db.sql' -print -exec sed -i~ 's/gallery2_main_/g2_/g' {} \;

find -name 'gallery_backup_db.sql' -print -exec sed -i~ 's/gallery_main_/g_/g' {} \;

now rename this new file to a new filename to assure you know which is the modified backup.

a word of caution:

since "/" is the separator of search and replace strings - it is obvious that your search string OR replace string may NEVER contain any "/" ! if you have to search/replace slashes then refer to howto and man pages to see how to escape /.

hans
Kriya Yoga, God and Love | Solutions | Philippine islands