Admin Login not working, password never changes in DB

I have successfully installed ZenPhoto on a test server and got it dialed in like I want. My client uses MediaTemple, where I did a manual install, and everything seemed to progress smoothly after taking care of the warnings in setup.

But I can't login in as an admin!

I checked mySQL and the user(s) are there in zp_administrators, and I have even tried setting the encrypted passwords manually in mySQL.zp_administrators from my test installation as well as the encrypted passwords from another post on this support forum. Every time I try to login I get "There was an error logging in. Check your username and password and try again."

So here is the really weird part. When I request the password reset, and I get into the admin area and I change the password to something I know it isn't currently, the password field in zp_administrators does not change!

Can someone help me out with a clue? I'm pretty saavy with this stuff, but debugging PHP isn't my forte.

Comments

  • You can set the define for DEBUG_LOGIN to have Zenphoto record the login attempts. It will tell you what is failing.

    EDIT: This creates a file named debug_log.txt which contains the record of the login attempts.
  • I'm experiencing exactly the same thing with 1.2.4.
    The PWD-change doesn't have any effect.
    The only way to change the PWD here on my installation is to delete the user record in the 'zp_administrators'-table and to run setup again.
    I kept forgetting the new PWD so I had to go through this quite a couple of times.
    I'll look at the DEBUG_LOGIN log tomorrow.
    Thanks for the hint - Michael.
  • thank you for the quick response. where do I set/define DEBUG_LOGIN? I did a quick search on the users guide and admin.php and don't see anything...
  • You have to modify the functions-basic.php script. The define is near the front to the script.
  • I changed line 13 of functions-basic.php to

    define('DEBUG_LOGIN', true);

    I tried logging in, got the same message, but no debug file appeared. I refreshed and checked in two different FTP clients, and then temporarily set write access for all folders that zenphoto is in, still nothing.
  • The file should be in the zp-core folder.
  • ok, i needed to set write permissions for that folder. here is what the txt file has after trying to login, failing, changing password through the reset mechanism and then trying to login again, then realizing I was reusing an old reset request URL, issued a new one, then changed the password, then tried logging in again:

    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_setCookie(zenphoto_auth, , 1242051049, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin-options.php [10]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    no admin or reset request
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin-options.php [10]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    zp_setCookie(zenphoto_auth, , 1242051203, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin.php [11]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    zp_setCookie(zenphoto_auth, , 1242051203, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_setCookie(zenphoto_auth, , 1242051211, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_setCookie(zenphoto_auth, , 1242051362, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin-options.php [10]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    no admin or reset request
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin-options.php [10]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    zp_setCookie(zenphoto_auth, , 1242051422, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_getCookie(zenphoto_auth): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [39])
    from require_once (classes.php [12])
    from require_once (class-load.php [7])
    from require_once (admin-functions.php [18])
    from admin.php [11]
    admins => (
    1 => ( user => dinan, pass => c47b92d3a6bc404455085a89c8f59b06, name => Joe Smith,
    email => test@test.com, rights => 75612, id => 1 ),
    2 => ( user => jsrobinson, pass => dbe654378df820aff2d4d123c19f1b5c,
    name => Jason, email => test@test.com, rights => 75612, id => 2 ),
    )
    zp_setCookie(zenphoto_auth, , 1242051422, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
    zp_getCookie(dynamic_locale): SESSION[mbe6mknapamcmn1oq43jlodmj4]=, COOKIE=
    zp_setCookie(zenphoto_auth, , 1242051429, /media)::album_session=0
    zp_getCookie(dynamic_locale): SESSION[]=, COOKIE=
  • This log does not show any save of the new password.

    Have you tried the nightly build on this problem?

    PS. If delete the file before trying again so we have clean data.
  • Upgrading to the nightly build worked! Thank you!!!
  • Fotos Member
    I experience the same problem on a new installation. Can you please tell me which version / which nightly build you use? Thanks!
  • acrylian Administrator, Developer
    You can test the RC1, link on the download page.
  • I'm having this problem on two separate installations. Any idea why this happens? I was able to regain access by dropping the entire table.

    `
    zp_getCookie(zenphoto_auth)::album_session=0; SESSION[5ce13e0791056353a171e554ce64bcfe]=, COOKIE=
    Backtrace: checkAuthorization()
    checkAuthorization called
    from require_once (auth_zp.php [44])
    from require_once (functions.php [40])
    from require_once (admin-functions.php [12])
    from admin.php [11]
    checkAuthorization: admins => (
    6 => ( id => 6, user => admin, pass => 'some hash',
    name => , email => , rights => 81788, custom_data => , valid => 1, group => ),
    )
    zp_setCookie(zenphoto_auth, , 1252209195, /)::album_session=0
    zp_getCookie(dynamic_locale)::album_session=0; SESSION[5ce13e0791056353a171e554ce64bcfe]=, COOKIE=
    zp_setCookie(zenphoto_auth, , 1252209198, /)::album_session=0
    zp_getCookie(dynamic_locale)::album_session=0; SESSION[5ce13e0791056353a171e554ce64bcfe]=, COOKIE=
    `
  • acrylian Administrator, Developer
    Strangely it seems that I encounter the same with one of my svn installs, too. Please open a ticket for this so that it does not get forgotten (because of this: http://www.zenphoto.org/2009/09/little-support-available-from-0908-to-0916/)
Sign In or Register to comment.