Can not log in as administrator

I'm learning zenphoto to use on my set. I go through the new installation setup process, set various options, create a couple of albums and upload some photos. In the process, I'm asked to create an administrator and password.

When I log out as administrator, I'm unable to get back in. When I run the admin.php in zp-core and enter the user name and password, all I get is invalid login. I've deleted the entire installation and re-installed 3 times, each time same results.

How do I get back in as administrator (zen_admin)

Comments

  • Sorry, what are you using to install Zenphoto? The version we supply will not let you do anything until you have entered a user/password. (No upload of photos, creation of albums, or the like.) Sounds like you are using a third party install. [Also the problem you describe is fairly common with these third party installs.]

    If that is so, you are using simplescripts or the like, you will have to take this up with them.

    If not, how about identifying the version of Zenphoto you are installing.
  • I am using version 1.2.9. To install, I simply unzip into a folder on my test site where I want the gallery and set a link on the home page to call the top level index.php file.

    This takes me through the setup process (I've already created the MySQL database and user) of which the final step is create an administrator log in and password. In my test, I then create a couple of albums, set some options and upload a few photos, just to understand how everything works and what visual effect the options have. What I have found is that once I log out as administrator, I can't get back in. I've been very careful to keep a record of the user and password but it does not let me in. When I try and reset by entering the captcha, I get en error that it can't send an email, probably because I'm doing this testing in a localhost environment.

    Any help as to what I'm doing wrong or missing would be helpful.
  • Your best bet is to install the 1.3.0 release.
  • I installed the 1.3.0 release.

    I still don't understand how to get back in as administrator.

    I set up the database, build some albums, set all my options. All works well. Once I close the browser down and come back into the site, I have no login box available to me to log in as admin. What option do I set to get this.

    If I run the .../zenphoto/zp-core/admin.php directly in the browser, my login and password do not work. Nor will sendmail work if I try and use cpatcha. This is all running on my local PC that has apache & MySQL running on it plus enabled for php. I have other test websites on this PC that work fine with MySQL and php. This one works fine until I log out, than I can't get back in unless I completely re-build zenphoto.
  • acrylian Administrator, Developer
    It seems that on some systems something goes occasional wrong. We have currently no idea what because we are not able to reproduce it yet (that sendmail does not work is often normal on local servers). Any errors in the server log?

    So, we need your help to find out what is going wrong here. My collegue who is the expert on this is unavaiable until next week. So I suggest you create a ticket on our bugtracker so this thread does not get lost and described detailed what you did. Also please post some details about your server (phpinfo() would maybe be helpful).

    You don't need to rebuild Zenphoto totally to get back in. The fix- as mentioned several times on the forum and also on our troubleshooting user guide entry- is to delete the administrators table in the db and then rerun setup.
  • I dropped the administrators table and re-created. So far no problems since.

    Consider this thread closed, I re-post with better details if it happen again.
  • telling an artist to "drop" a mysql "admin" table is akin to shooting yourself in the foot - do-able, but unpleasant. And then you have to deal with the whining.

    You guys are great coders - why not make a script to handle these real-world abnormalities? There must be some way ... and I am happy to help.
  • acrylian Administrator, Developer
    Well, installing software on a server does simply require some knowledge and/or willingness to learn about. Sometimes it is a little "do it yourself" kind of stuff. And I say that coming from design actually not coding.

    We still can't reproduce this issue which makes it hard to find out why that happens for some (as reported on other threads). We of course would love if this would not occur.
  • Actually, normally you do not have to drop the table. As the troubleshooting guide will tell you, if you have provided an e-mail address you can get a reset link sent to you. Not much we can do an installation does not support e-mail sending or if an artist chooses not to provide needed data.

    Besides, I have a strong suspicion that all these instances are caused by having used a third party install sometime in the past. Those that provide you with a user/password can easily set up things so that the login will work until the cookie expires. Once that happens you cannot log in again as the install program has botched the hashed credentials.

    Anyway, our offer still stands. If someone who experiences this problem wishes to have it resolved then set the DEBUG_LOGIN define to true and go through the process. Maybe you will have someting different, but so far, what we have seen is always that the hashing of the supplied user/password of the login does not match the hashing of stored in the database. There is absolutely no way to tell why this would be. That is the beauty of hashed credentials, they are pretty much one way encryptions unless you really want to apply some brute force computing power to them.

    Since the user name is clear text, what we can tell is that either the password tendered is not the same as when the user was created or that the hashing algorithm is not the same. The latter is usually what happens with the third party installers.
  • eww Member
    I am having the same problem. I have reinstalled twice and I have deleted the admin table. I have it send me a reset links I do that, try to log in and I get a blank login screen again. Also I have looked at the db and my username is visible.

    The previous setup I did I had a sql error message for admin during setup and deleting the admin table worked. My un and password are the same and simple: Admin. If you want to take a look at it please send me an email. cbfga@bellsouth.net
  • I have created a new troubleshooting article. Please see http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#47
  • I'm getting this same problem. I was using Zenphoto the other night, when rather suddenly I couldn't access the admin pages. Any attempt to do so would result in a "Connection has timed out" browser error message.

    I upgraded to 1.3 today (I was running 1.2.6 before). As soon as setup was done, I tried to log in. I still could not.

    I found this thread, and following the advice above, I deleted my zp_administrators table and reran setup. I still couldn't access the admin pages -- not even to log in.

    I've tried deleting the zp_administrators table and rerunning setup several more times... with the same result each time.

    I am really disappointed. I spent a lot of time getting Zenphoto looking the way I wanted, and uploading pictures. (My gallery is at http://bookofsand.net/photos, and uses a customized version of the Flickrish theme.)

    Now it appears that the program is suddenly, inexplicably unusable to me. If that's the case, I've wasted a huge amount of time and effort on it.

    Any help appreciated. I'm not ready to give up on Zenphoto quite yet!

    P.S. I've looked at http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#47. I can't follow these suggestions, because when I run setup, I am not prompted to create a new username and password. I am simply told I can view my gallery or administer. I can view the gallery without a problem, but I can't get to the admin pages.
  • OK, I have to update my previous post. I was just viewing my gallery, and idly clicked on the Admin Toolbox link at the top of the page. A menu appeared beneath it, with several links: Admin, Options, Edit Album, Sort album images, Delete album, Upload Here, New Album Here, Logout. I knew these links were part of my theme, but was slightly surprised to see them, since I couldn't log in.

    I was expecting that none of these links would work, since I can't access admin.php. The Admin link, which went to that page, didsn't work -- it timed out. But to my surprise, most of the other links did work! For example, by clicking on Options, I could access the "users" tab of my admin pages.

    Once I was in the admin pages, I could access almost anything by clicking on the tabs -- "upload", "albums", "tags", "comments", "users", "themes", "plugins", "logs". The only tab which didn't work was "overview", which attempted again (unsuccessfully) to direct me to admin.php.

    To my even greater surprise, and alarm, I found that I could access most of the admin pages from any of 4 different browsers, on 2 different computers, without logging in! In other words, most of my admin functions were wide open to anyone browsing my gallery.

    This means that anyone could come along and delete or upload content, create new users with admin rights, and do all sorts of other damage. This was obviously totally insecure and unacceptable. I had no choice but to delete my Zenphoto install immediately.

    At this point, I am leaning against trying to reinstall the program. Even if I could get it running again, I don't know when I might be suddenly locked out, or find that anyone could access my supposedly secure admin functions.

    Good luck getting your program working and secure. It proved to be neither for me.
  • acrylian Administrator, Developer
    Don't you think you give in a little too fast so that you even can't wait a few hours to wait for a reply by us?

    http://www.zenphoto.org/2009/03/troubleshooting-zenphoto/#47
    As this states you have to change the file named within zp-core to get the debug log.

    I really doubt that anyone could access your backend. Most likely you still were logged in with your browser as that is stored via cookies (or sessions if you use that setting) on your browser. Clear the browser cookies and best also the browser cache. Or did you try this with anohter browser and computer as well?

    Your problem came because you upgraded from a rather old version. That can happen since some user handling changed since 1.2.6 and we have not exactly tested upgrading from those old version. Probably we should have stated that on the upgrade page. I apologize for that.

    Anyway, let us know if you want further help.
  • acrylian Administrator, Developer
    Nice since you even posted your rant on Twitter before even waiting for a response from us, I guess you are not really interessted in help. Now that's really the right behaviour to help open source projects like Zenphoto to get better which are depended on user reports. But using the bugtracker is of course probably too much work.. Thanks for this useful contribution.
  • I rather doubt the veracaity of this post. Clearly this person is someone with an ax to grind (although it is beyound me why.)

    What he has described just is not possible with Zenphoto. So either the descriptions are poor or they are fabrications. The fact that he has said the same on Twitter without waiting for a response seems to indicate the latter.

    For instance, it is somewhat inconsistent to say that he cannot access the admin pages on the one hand and on the other that he can do so from numerous computers while not logged in.
  • acrylian Administrator, Developer
    Well, he didn't say he tried from numerous computers which is why his "opinion" is a little too fast generated..
  • I installed the 1.3.0 release and its working properly in my system.. no issues at all.. i dont know why people in above comments are not been able to install it perfectly could it be the system issue?
    i feel pity for them..
    any ways thanks team for this wonderful release
  • acrylian Administrator, Developer
    The current release is 1.3.1.1, just to note...
Sign In or Register to comment.