Error while accessing G2User Administration After SVN Update

adcamp686

Joined: 2008-05-15
Posts: 2
Posted: Thu, 2008-05-15 21:08

When accessing the user system at http://gallery.cappies.com/main.php?g2_view=core.SiteAdmin&g2_subView=core.AdminUsers I get the message "The administration session has expired, please re-authenticate to access the administration area." I am then prompted for my username/password combo again, and even after multiple attempts of accepting cookies, trying separate functions, etc.. this is the ONLY function that I run into a problem with. I recently upgraded to the newest release via SVN and ever since, it's been causing this problem. Any advice would be helpful.

Thanks!


Gallery version = 2.3-svn core 1.2.33 r17609
API = Core 7.53, Module 3.9, Theme 2.6, Embed 1.4
PHP version = 4.3.11 apache2handler
Webserver = Apache/2.0.53 (Fedora)
Database = mysql 3.23.58, lock.system=flock
Toolkits = ArchiveUpload, NetPBM, Thumbnail, Ffmpeg, Gd, ImageMagick, LinkItemToolkit, Getid3, jpegtran
Acceleration = none/0, full/86400
Operating system = Linux web.cappies.com 2.6.12-1.1381_FC3 #1 Fri Oct 21 03:46:55 EDT 2005 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2)
Rows in GalleryAccessMap table = 120
Rows in GalleryAccessSubscriberMap table = 6961
Rows in GalleryUser table = 11
Rows in GalleryItem table = 6952
Rows in GalleryAlbumItem table = 124
Rows in GalleryCacheMap table = 1

Login or register to post comments
Kurse

Joined: 2003-10-15
Posts: 1
Posted: Wed, 2008-05-21 23:09

I have this exact same issue. Cannot get into the Site Admin section. Anyone have any idea where to begin investigating this?

Login or register to post comments
GreyHead

Joined: 2008-05-23
Posts: 3
Posted: Fri, 2008-05-23 17:29

Me too, I noticed that during the Upgrade the Core Module did not upgrade correctly. There have been some subsequent changes in SVN and I've copied those over but can't find a way to reupgrade.

I've deleted all cookies and sessions, checked that I still have the correct group membership in the database. I can login OK, but not access the site admin at all.

Bob

Login or register to post comments
GreyHead

Joined: 2008-05-23
Posts: 3
Posted: Fri, 2008-05-23 19:56

I think I found the cause of this - at least I've just got back to the Site Admin Settings page.

Later: D**** spoke to soon. I got logged back out again . . . but it must be something near this.

In SVN the version.dat file sets the version to 1.2.33 but in CoreModuleExtras.inc the switch/case list that is checked stops at v 1.2.32 and this causes the Error on the Core Module upgrade that I was experiencing. I added a dummy line in here at line 2550 (this may be incomplete, I've no idea what else *ought* to be here)

case '1.2.33':
	    /* Dummy to force completion */

and now can re-run the upgrade correctly and the Core Module upgrades. However I still have the timeout problem.

The case statement for v 1.2.31 just above is

/* Implement re-authentication for Site Admin Access */
$ret = $module->setParameter('session.siteAdministrationTimeout', 15 * 60);

and I thought this might be connected. Maybe the upgrade should have run this but didn't???? If this parameter is set to zero it would explain the problem of instant timeout.

Anyhow I found the parameter wasn't in the g2_PluginParameterMap in the database so I added it as 'module, code, 0, session.siteAdministrationTimeout, 900'. Once I'd done this I deleted the current sessions from the database cleaned my cookies and the login seems to work OK.

Bob

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 21
Posted: Mon, 2008-05-26 05:45

Any news on this? I'm getting the same problem, but whatever I do (with the comments above) it doesn't let me in.

Edit: I turned on debug information, but there's no clear indication of what makes the redirection to the userLogin form again.

Are there any of the Gallery developers out there that can help us out?

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 31958
Posted: Mon, 2008-05-26 06:23

thanks for your trust in the SVN version and thereby giving us early feedback for recent development changes.
i'm using the SVN version as well and don't experience any problems with it.

yes, we introduced c18n (compartmentalization) for the site admin area. that means that access to the site admin area is now stricter, more secure. if you don't do anything in site admin for 15 minutes and then want to visit the site admin area again, you need to provide your password again.
but it's still pretty convenient: if you login as admin and then want to visit the site admin area, it works as in gallery 2.2. you're not prompted to enter the password again since you just logged in a few seconds ago anyway.

no idea where your upgrades went wrong. maybe the login event listener isn't registered in your database for some reason.

please query your gallery database and report the results.
SELECT * FROM g2_factorymap where g_classType = 'GalleryEventListener' and g_implModuleId = 'core';

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 21
Posted: Mon, 2008-05-26 08:10

valiant, are you running a local web server (what platform)?

Due to my problem upgrading stated in this post http://gallery.menalto.com/node/77444 I ended up copying the files down from the web server to my local machine, run a local web server, do the upgrade on the local web server and re-upload files, export/import the database on the web server....all of this burn most of my saturday...

I don't seem to have those problems on my local web server (Windows XP SP2, running apache/MySQL), but I do get the problems on my hosting web server (Linux/MySQL), but unfortunately, my wonderful hosting company has the server down, and I can't get to the web server or databases to give you the info you requested. Will do it as soon as I can get it...

Login or register to post comments
GreyHead

Joined: 2008-05-23
Posts: 3
Posted: Mon, 2008-05-26 08:11

Hi Valiant,

I've just re-installed the latest SVN Rev 17623 from scratch and confirm that there is no login problem with that. I got the problem when upgrading from a 2.2. install to SVN when there are definitely some problems including the site admin login problem. As far as I can tell the reauthorise time is set to zero instead of 15 minutes - which probably means that it isn't set at all.

I deleted my old installation so can't check the database for you, sorry.

Bob

Login or register to post comments
adcamp686

Joined: 2008-05-15
Posts: 2
Posted: Mon, 2008-05-26 15:08

valiant,
I also had re-installed the software, however I used a different database name so that I could continue to troubleshoot should a solution arise where I could re-instate the other version...

Quote:
please query your gallery database and report the results.
SELECT * FROM g2_factorymap where g_classType = 'GalleryEventListener' and g_implModuleId = 'core';

Result:
mysql> SELECT * FROM g2_factorymap where g_classType = 'GalleryEventListener' and g_implModuleId = 'core';
ERROR 1146: Table 'gallery.g2_factorymap' doesn't exist
mysql>

Thank you for the assistance.

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 21
Posted: Mon, 2008-05-26 18:41

adcamp686, if you're on a *nix box, you probably have to change "g2_factorymap" to "g2_FactoryMap"

valiant, this are my results:
This is what I got (sorry, copy/pasted from MySQLAdmin web page. Don't have ssh access to the box):

g_classType g_className g_implId g_implPath g_implModuleId g_hints g_orderWeight
GalleryEventListener GalleryItemHelper_medium GalleryItemHelper_medium modules/core/classes/helpers/GalleryItemHelper_medium.class core a:4:{i:0;s:27:"gallery::viewabletreechange";i:1;s:25:"gallery::removepermission";i:2;s:19:"galleryentity::save";i:3;s:21:"galleryentity::delete";} 4
GalleryEventListener GalleryUserHelper_medium GalleryUserHelper_medium modules/core/classes/helpers/GalleryItemHelper_medium.class core a:2:{i:0;s:20:"gallery::failedlogin";i:1;s:14:"gallery::login";} 4

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 31958
Posted: Mon, 2008-05-26 19:00

i'm running a public box on a shared webhost (unix) and a test box on my notebook (windows xp). both are running the latest svn version and i don't have problems on either machine.

sorry about the SQL command, please try:
SELECT * FROM g2_FactoryMap where g_classType = 'GalleryEventListener' and g_implModuleId = 'core';

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 21
Posted: Mon, 2008-05-26 22:14

I upgraded to the latest and greatest, and the same problem. I can't get in to the site admin page. I've got the debug pages, but it is hard to tell where things go wrong...any ideas/help?

thanks

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 31958
Posted: Mon, 2008-05-26 22:55

I've fixed an issue today. Might fix it for you.
Please svn update or wait for the next nightly snapshot.

This is the change:
http://gallery.svn.sourceforge.net/viewvc/gallery?view=rev&revision=17624

If that doesn't fix it, please use lib/support/index.php -> cache, to clear your database cache. maybe that helps.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
valiant

Joined: 2003-01-04
Posts: 31958
Posted: Tue, 2008-05-27 01:14

If any of your are using G2 embedded / integrated into another application (WordPress, Drupal, PHPbb, etc.), then please stay tuned. There is a problem with this new security feature and integrations. For now, please access your gallery directly (not through the integration) if you want to access the site admin area.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

Login or register to post comments
totem

Joined: 2008-03-04
Posts: 21
Posted: Tue, 2008-05-27 01:33

valiant, I have installed the two files you've updated, and I've been using it without a problem! (and it does timeout, and I re-login without a problem). Thanks a whole lot!

(now to test the PicLens support)

cheers

Login or register to post comments
lexthoonen

Joined: 2006-11-21
Posts: 21
Posted: Mon, 2008-06-09 21:49

I upgraded (three versions) to the latest SVN today. During upgrading: all went fine. However, I can't login into the admin section.

I cleared the cache via lib/support/

I made the two changes found here:
http://gallery.svn.sourceforge.net/viewvc/gallery?view=rev&revision=17624

Querying the database gives me this:

ERROR 1146 (42S02): Table 'georgegallery_db.g2_factorymap' doesn't exist

So that explains a bit I guess.

And yes, gallery2 is embedded in drupal, but i'm trying to go in directly, without drupal here.

Login or register to post comments