Multisite gallery. The administration session has expired on one, but not on other gallery
constm
Joined: 2009-10-25
Posts: 19 |
Posted: Sun, 2009-10-25 07:26 |
I have multiple galleries running on the same code. I upgraded all of them from 2.2.6 to 2.3. I believe (as it was long time ago), on one of gallery I installed Google maps and/or piclense (coolpic) plugins. Sometime after I realized I can't login to Site admin interface. Getting: "The administration session has expired, please re-authenticate to access the administration area." message. I have debug output handy and I can post it somewhere. I also did search forums, but there are no definitive answer to this problem. Any help appreciated, |
|
Posts: 16504
Debug output can be zipped and attached to this thread.
But run through these FAQ:
FAQ: I can't login anymore, what can I do now?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
Archive.zip is posted.
First file main.php.html is what I'm getting when click on Site admin link. Second file Gallery User Administration.html is after "artificial" refresh. Seems to me with debug mode enabled this function works in two steps.
PS FAQ did not help.
Konstantin.
Posts: 16504
I don't see anything there, I can only think to make sure that the user that PHP runs as for that site has access to /tmp and that /tmp isn't full (though if it was and that's where other sites write their sessions to they'd be having issues too.
Maybe try a different path for session.save_path
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
Where do I change session.save_path? Also, where /tmp is usually located? I can't find it.
Thanks.
Posts: 19
OK. So, what are my options here? Is there a way to remove modules one by one and see which one is causing problem? I saw missing .htaccess files when doing sytsem check, but I found them in source and cop to proper folders. So no more complains in that department.
If I have DB back up and reinstall Gallery 2.2.6 or 2.3 into new code directory and then restore from back up, will it render my new install useless again?
Thanks,
Konstantin.
Posts: 16504
You can try disabling modules this way:
FAQ: How can I deactivate a module when I am unable to login?
If you PM me login details I'll try seeing if I can get more info too.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16504
Hmmm, frustrating.
This probably won't fix it, but try going to gallery/lib/support and clearing all the cache.
I'm not seeing any errors popping up at all.
Try specifying a different directory than /tmp for session.save_path. That way you can look in there and delete all sessions of needed.
You could also try emptying out your SessionMap table in your database. I don't know how to do that, sorry:
http://gallery.menalto.com/node/70181
You could try reinstalling, but I don't have high hopes of that fixing the problem. And going back to an older version won't be possible unless you restore an older g2data and database.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
Thanks again.
Clearing cache was done few times already on different stages of troubleshooting.
I'll try to figure out what went wrong on DB level.
And if that does not help - reinstall and reimport, oh well... fun times! I guess it's fair pice to pay for privilege to have your own gallery and not to use picassa, flickr or .mac
K
Posts: 16504
I don't think that's a fair price
If you haven't started with a reinstall already, I've asked another support person to see if they have any other ideas.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
No, I have not. Too busy with pre Halloween stuff. I left my main sick galley in debug mode. Please let me know what another person thinks.
I just thought that I'll need to redo all 3 galleries that share the same code in case of reinstall. That sucks.
Thanks,
Konstantin.
Posts: 27300
The only thing I can think of is truncating the sessions table.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 19
I certainly can do it. Is it safe do delete all records from Sessions table? What will I loose?
thanks,
K
Posts: 27300
When dealing with the DB manually create a backup.
Try the truncate and it might fix your issue. If you have issues restore your backup.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 19
Deleted all records in g2_SessionMap table. Still can't login to Admin interface. Any other ideas what to try?
Thanks,
Konstantin.
Posts: 27300
PM me the admin login info.
FTP access might be useful as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Got your PM.
I am able to login with the info provided.
I was able to add an album and add items and the new item does show in the imageblock, but the album is empty.
I will ask another dev to investigate as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 19
Thanks, Dave.
Were you able to login to Site Admin interface? I.e. after loggin in as admin, click on "Site Admin" link in upper right corner? This is where I'm getting "The administration session has expired, please re-authenticate to access the administration area." message.
Thanks,
Konstantin.
Posts: 27300
Did this ever work?
I have not done many multisites but I don't think you can nest the codebase for the multisite in a multisite, you might but I have never tried.
I am also a bit confused as to the URLs versus the FTP locations. the URL provided does not have a direcotry yet the FTP access does.
Install gallery where your codebase is and see if it work there.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Your codebase site /km/gallery_code/ is using the same DB as the /km/gallery site.
Did you start with a site using the codebase?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16504
Dave asked me to look at this too.
I'm not that familiar with multisite installs either, but it appears your config.php for your main code base is an older version. Doesn't look like there are major discrepancies but it is older.
Did you follow these instructions?
http://codex.gallery2.org/Gallery2:Multisite#How_to_Upgrade_a_Multisite
I do find it odd that your other multi site installs are working fine and this one is not. But the others have their own database and login info, where the problem one is using the same DB as the main code base.....
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
Yes, it did. I was able to install new plugins and do other things under Site Admin.
I can provide the structure of my multisite folders if needed. I believe any new gallery install will work. Either multistie or singlesite.
I believe these two are the same. One is codebase used by multiple sites, another is single instance.
Konstantin.
Posts: 19
Thanks,
I think I used "Multisite" instructions. I had different domains using separate code for each gallery installation, and then realized i can have them combined for easier management, especially, they all are hosted on the same ISP. Did combined them all on one miltisite gallery and it worked on pre 2.3 version. Then upgraded and installed 1 or 2 new plugins. Sometime after that I realized I can't login to Site Admin anymore. So, it does not look like bad singlesite to multisite migration, IMHO.
At his point I'm ready to look at other more time consuming options. May be decouple galleries? If you need login info to other members of multisite installation, please let me know.
Thanks for your help.
Konstantin.
Posts: 19
Update.
Just logged in to me 2 other galleries and under Site Admin went to Plugins. Both gave lovely:
Error 500 - Internal server error
An internal server error has occured!
Please try again later.
Under Maintenance I got this on both:
Error (ERROR_BAD_PATH) : Invalid path: modules/integrity/classes/IntegrityCheckTask.class
* in modules/core/classes/helpers/GalleryFactoryHelper_simple.class at line 171 (gallerycoreapi::error)
* in modules/core/classes/helpers/GalleryFactoryHelper_simple.class at line 201 (galleryfactoryhelper_simple::newinstance)
* in modules/core/classes/GalleryCoreApi.class at line 175 (galleryfactoryhelper_simple::newinstancebyid)
* in modules/core/classes/helpers/MaintenanceHelper_simple.class at line 46 (gallerycoreapi::newfactoryinstancebyid)
* in modules/core/AdminMaintenance.inc at line 176 (maintenancehelper_simple::fetchtasks)
* in modules/core/SiteAdmin.inc at line 209 (adminmaintenanceview::loadtemplate)
* in modules/core/classes/GalleryView.class at line 293 (siteadminview::loadtemplate)
* in main.php at line 465 (siteadminview::doloadtemplate)
* in main.php at line 104
* in main.php at line 88
* in main.php at line 3
System Information
Gallery version 2.3
PHP version 4.4.9 cgi
Webserver Apache
Database mysqlt 4.0.27-max-log
Toolkits Thumbnail, SquareThumb, NetPBM, Gd
Operating system Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4
Is it symptom of something unfixable?
Thanks.
Posts: 16504
I think part of your problem is your main code base and your problem site is using the same tables in the same database.
For this bad path problem make sure that the integrity module is in your main code base's modules/ directory.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
OK. I fixed the bad path problem. You were right - integrity module was not in the modules folder! Works now. Main gallery is still sick, however. How do I make main code base and problem site to use different tables in DB? I was under impression that "main code base" is not using any tables in DB, only "working" galleries are.
K
Posts: 16504
I'm going to have to setup a multisite install to see what it takes.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 4342
If I understand the multisite architecture correctly, the settings for any "main.php" - including which database and table-prefix it uses are in the adjacent config.php file.
If you want to use the main codebase to run a gallery installation (you don't have to) then the database settings for that are in the config.php file in the main codebase directory. The database settings for the multi-site (secondary installations) are in the config.php files adjacent to their own respective main.php files.
I think.
Posts: 19
If I try to access my /gallery_code/ directory from the web it gets redirected to /gallery/. I want to make it work as it was designed, and see if it solves my original problem. So, codebase is supposed to take care of all multisite instances, but not dedicated to any particular. And all single "small" /gallery/ folders are taking care of only its own galleries. Correct? If so, how do I proceed with this change, if it's needed?
Thanks,
Konstantin.
Posts: 4342
In general: things that cause Gallery or Apache to change the url:
- the baseUri parameter in the config.php file (at the end) - obviously you can have a different setting for every install, but if for some reason one is pointing to the url for another of your installs this will cause a lot of confusion! It's perfectly acceptable to leave the setting blank, and I think that's actually recommended for *all* installs, and personally I would recommend that.
- alias entries in your .htacess or apache setup
- a preexisting url-rewrite section in your .htaccess
Not sure if there are any others.
The mechanism by which the baseUri setting works is very straightforward, but can lead to subtle results. It's used every time Gallery needs to create a new url - which can be for links within a page, that you click on - and also for automatic redirects (that are effectively invisible to your browser - you just see the new page and url appear.)
Posts: 19
OK, I reinstalled codebase of 2.3 and recreated multisite instance for one gallery that was working using the same DB and gallery data folder. Now I can't login to Admin interface of this gallery at all. And because it had (still has) password protection on it, I can't view it. There are some plugins missing, but I don't think they are related. I don't see any errors in debug on Admin login attempt.
Very close to either "reinstall from scratch" or "look for alternatives"... (
K
Posts: 4342
I've come late to this party, so I'm not really clear what the issue that you're trying to solve is - is it just that you can't log in to one gallery? What happens if you try the password recovery procedure? or the emergency login procedure with the password from the relevant config.php? Could I ask you to restate the problem again? I know there's been a lot of discussion about multisite architecture, but multisite installs come up with the same problems as single-site installs, and it's possible we're overcomplicating things?
Posts: 19
Alecmyers,
Here is the "history of the patient".
I had multiple single site installations hosted on the same ISP, under the same account. They all were pre 2.3 versions. Then, at some point I decided to migrate them all into multisite gallery install. Followed instruction and successfully completed the process. All 3 worked ok. Then started put more modules in them and after a while realized I can't login to "Site Admin" on one of my gallery (Session Expired message). Could login to other, however. Posted help request here and with a great help of Dave and nivekiam discovered couple other things. Like the fact that my codebase config file is pointing to the same DB, that "problematic" gallery. Also, "good" galleries are giving me Internal Server Error 500 if I click "Plugins" link in Site Admin Section. In attempt to "divorce" codebase and "bad" gallery I performed fresh 2.3 install choosing Multisite option and pointing to DB and Data folder of one of my "good" galleries. All went smooth, but then I realized I can't login as Admin to it. Digging around showed that some of modules are missing, but I don't see them being responsible for authentication.
So, this is where I stand now: one and a half semifunctional galleries.
As always, any help is appreciated.
Konstantin.
Posts: 4342
OK - and where do you want to get to? Three multi-site installations? Or three standalone installations?
Posts: 19
Ideally, three _working_ multi-site installation. If not possible, three standalone.
K
Posts: 4342
Well, if you want to pm me some login details (can you run a shell on the host?) and urls I will have a look... no promises though.
Posts: 4342
After a bit of investigation, I have an idea as to why you can't get to the Admin pages on your first site. Do you have phpMySQL available so I can look at the db contents?
Posts: 4342
Well it's now nearly fixed.
Firstly you had an important (nay, critical) entry missing from a core DB table, which I put back in. That means you can get the admin functions going again as it doesn't throw you around telling your Admin session has expired continually. I am curious, but not prepared to speculate on why that entry was missing, how long it's been missing, and what else might be missing too (and still undetected as missing).
Secondly the 500 Errors are (it seems) a 1and1-ism of highest order: I fixed them on your main site with the information in this thread/post:
http://gallery.menalto.com/node/75506#comment-270361
I suggest you add those lines to the .htaccess of the other two sites (I've only worked on the /km/ one) and see if that fixes things there.
There is one curiosity that still concerns me: I've turned debugging to false in the config.php but the main gallery album is still showing a logged debug dump at the bottom of the page. There's no debugging info showing anywhere else that I can see and I don't know why it should still be happening on this page! I've cleared your template cache (that never helps, why does one bother?) - perhaps you could confirm that it is or isn't showing up for you?
Finally, *don't* have two copies of the codebase hanging around with similar names (g2_code, gallery_code) - it will confuse you as much as it confuses me, in a few months. Get rid of the one you're not using.
Posts: 16504
Thanks Alec! You got to the root of that a lot faster than I ever could have.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 19
Wow! Thank you, Alec!
What that entry is? And if something else is missing, is it worth completely redo the gallery without restoring DB from backup before the consequences of missing piece shows up its ugly head? The only thing in my galleries I'm regretting to loose is captions. I guess there is no way to restore captions only? The structure can be easily recreated b/c data folder replicates it.
Done it on /am/ and it works beautifully! Thanks again.
It still an issue for me (but I think it worked ok on first view/login) and this is another reason why I'm willing to redo all 3 galleries. Also, third experimental gallery /kim/ is still unable to let me in as Admin at all. I guess this one will e first one to receive "refresh". Or should I wait till v3 is out of beta? ;-)
Deleted.
Thanks, Alec, again! Pls check your PM.
Konstantin.
Posts: 4342
Don't know if anything else is missing.
Unfortunately the captions are tied to the the imageId, which are likely to be different if you start from scratch and reinstall.
Could be a long wait.
I'd love to know about the debug on the first page, why that's happening. Maybe Nivekiam or Floridave have a suggestion on that one?
Posts: 19
I'll probably reinstall it and enter captions for all 31 (!) images manually. Found the mapping between g_id and file name in FileSystemEntity and g_ig <-> Title in g_Item table.
I notice that 2 files were modified in code module. Replaced them with original ones and the debug problem gone... Go figure...
Thanks, guys, for your help.
Konstantin.
Posts: 15
I am suffering from the same problem at the moment.
What was the "Critical" missing entry?
I had a single install. To save space, I decided to create a multi-install out of it. My "main" gallery site is stuck in the admin loop. My "addon" gallery is working fine.
Thanks for the help