resetadmin file in /Setup not being recognized

msalt

Joined: 2010-08-04
Posts: 8
Posted: Wed, 2010-08-04 22:51

Hi, I inherited an old Gallery installation but can't login as admin and so can't add or delete photos, etc. Followed your FAQ but the Configuration Wizard doesn't seem to notice the resetadmin file.

I read through your documentation, and created an empty resetadmin file in Gallery/Setup/ (no file suffix, all rights), CHMODded the files (755 for Gallery/setup/ & 777 for .htaccess, /Albums/ and config.php. (BTW, should Albums remain 777? The documentation doesn't give a rights setting for after configuration that I could find, where it says 400 for setup and 644 for other 2.)

The Configuration Wizard runs fine, I can change the email address and apparently the password in step 2, but I can never log in with the old or new passwords. Config Wiz doesn't seem to notice the resetadmin file -- I'm not prompted for anything to edit into that file, a hash or anything else. Session diagnostics are fine -- the session cookie test increments each time I refresh. Whenever I change the password, I see new entries (a #, & #.lock) in the .user folder in /Albums/. I sent a test email to the new email address I entered in Config Wizard, and it arrived promptly.

I verified that I matched the domain (www.), and switched to a different client computer (Mac w/Safari instead of PC/Firefox.) Same problem. 1 interesting thing -- this thread http://gallery.menalto.com/node/54856 quotes some login.php code that is obviously looking for resetadmin in GALLERY_SETUPDIR. There's no code like that in my login.php. I understand that aztecboi is quoting v. 1.5.4 and I'm on an older version, but it might reveal something.

Thanks so much for everything, this is great software and it bugs me seeing people complain in these forums. Yes it's frustrating -- welcome to computers! Mark

Gallery URL : www.stevefoley.org/gallery/
Gallery version: 1.4.3-pl2 (06/01/04)
Apache version: Apache/2.2.13 (Unix) mod_ssl/2.2.13
PHP version (don't just say PHP 4, please): PHP v5.2.11
Graphics Toolkit: ImageMagick
Operating system: Linux [host name redacted] 2.6.18-164.11.1.el5 #1 SMP
Web browser/version (if applicable): multiple, Mac and PC, Firefox and Safari

 
msalt

Joined: 2010-08-04
Posts: 8
Posted: Thu, 2010-08-05 06:40

One more point -- after I failed the login at the popup window (login.php), I tried the FORGOTTEN PASSWORD? input, which I enabled for this very purpose. But when I enter "admin", it says "Error: Not a valid username". There are now 6 separate user records with that login in .users, after my various runs of the Config Wizard, and yes, I did try manually deleting the old ones once to see if that would help, to no avail (re-uploaded them again afterwards). It appears that the function $gallery->userDB->getUserByUsername($username is not working correctly.

I have however verified the .USER directory setting in CONFIG.PHP.

I also tried deleting the .HTACCESS file in /SETUP/ as recommended in another thread, doesn't solve the problem. (Doing so in the GALLERY folder, however, did fix the 500.SHTML problem I ran into at first, which caused the entire GALLERY application to fail to respond. And fixing the earlier bad directory for .USER and other files solved the next big problem. Now, just need to fix the admin pwd. )

 
msalt

Joined: 2010-08-04
Posts: 8
Posted: Fri, 2010-08-06 06:32

Yet one more point. I wanted to verify that the program can find the userDir, based on the setting in gallery/config.php. (Following the instructions from another thread, I temporarily installed phpinfo.php in the /gallery/ folder, and it showed blank for userDir, though I'm not sure that is referring to the same userDir.)

my .users folder is in /albums/. There is of course also a setting for the albums directory in config.php. I tried breaking that by changing the albums directory setting (misspelling albums.) Sure enough, the Gallery stopped working. Restoring the setting fixed it. Since the /.users/ folder is a direct subfolder of /albums/, I can be sure the setting in config.php is correct, since it's [path]/albums/.users

I don't have trailing / on either directory. Unless the . in .users is causing a problem, that's not the source of the issue.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2010-08-06 06:48

Do you really only have 14 total images in your gallery?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
msalt

Joined: 2010-08-04
Posts: 8
Posted: Fri, 2010-08-06 08:37

I reckon so. I'm not the furniture artist, I'm helping him get his website back up after the guy who made it for him bailed.
I know that one big issue was, Steve couldn't add any albums or photos because the login didn't work.

BUT -- after trying everything else I could find on these forums (deleting the .HTACCESS file in /SETUP/, etc.), I upgraded to Gallery 1.5.10 and it works fine now. As soon as I upgraded, the first time I ran the Config Wizard, it finally noticed the resetadmin file and asked me to paste some numbers in it. That was the step that was failing before. Honestly I don't know if it had updated the password before or not -- doesn't really matter because, since it couldn't get the User from the User Name, it couldn't check that password anyway, or email it to me.

The update process went pretty smoothly, following the instructions on Upgrading on this website. This forum post tipped me off that PHP 5.x has unspecified compatibility problems with Gallery versions older than 1.5. http://gallery.menalto.com/node/79967 Apparently, not being able to log in is one of those.

Mark

 
extertain

Joined: 2011-01-28
Posts: 1
Posted: Fri, 2011-01-28 10:55

I have developed a new site called Ajmerone.com, this is for the city Ajmer. All I want to know is, how to integrate the Gallery in this Drupal based website?

I have lot of photos of Ajmer and want to make sure that the same are appearing in the gallery and slideshow versions if that is possible via this Gallery.