ZenphotoCMS Forum
Can't log in, but it's recognize user/password - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Can't log in, but it's recognize user/password (/thread-9047.html)

Pages: 1 2


Can't log in, but it's recognize user/password - choobek - 2011-09-06

Hi!

At first I want say Thank You for all programmers who made this gallery. It's very useful and easy to use.

Let's go to the problem. I made a new gallery and wanted to put it on server. On other servers or local, everything was all right but on that server, logging in seems to doesn't work.

When I put some uncorrect login/password I get the message that password it's incorrect - so It's fine. But when I put correct information and click Log in, the site is refreshing and address in web browser is http://exampleaddress.com/zenphoto/zp-core/admin.php# with this "#" at the end. I can't open admin panel. I even don't know if I'm logged in but I think I'm not because Admin Toolbox on the main site is still hidden.

I saw few topics with the same problem but they weren't solved.

I tried to reinstall all package and fill it with my theme, sql database, photos and cached photos(thumbs). I tried to install fresh nightly builds. It didn't solve the problem.

The difference between that server and others (where everything was all right) is that I had to uncomment and change this line in zp-config.php:

define('WEBPATH', '/www/grodzisko');

because the links, imgs, even css didn't work. I don't know if this is connected with my problem. Defining SERVERPATH is still commented.

Please, help!
It's the address of my gallery: http://interplaza.pl/www/grodzisko/




Can't log in, but it's recognize user/password - sbillard - 2011-09-06

What happens if you use the same link without the crosshatch?

Also, is the link you quote the actual link shown or just an example as the text might indicate?




Can't log in, but it's recognize user/password - choobek - 2011-09-07

Crosshatch is showing when I put correct or also incorrect login/password.

If pass is wrong, it's throwing out error that pass is wrong. If pass is correct it's refreshing the page.

The link http://exampleaddress.com/zenphoto/zp-core/admin.php# is of course example. True link is http://interplaza.com/www/grodzisko/zp-core/admin.php#




Can't log in, but it's recognize user/password - acrylian - 2011-09-07

The "www" in your link is really weird. Normally that "www" directory is only used internally for the web root on a server. Besides that the url does not even work for me. The only that works is the interplaza one.




Can't log in, but it's recognize user/password - choobek - 2011-09-08

Hi,
I fixed the problem with address. Now the gallery is here: http://grodzisko.interplaza.pl . It's working with commented line with defining WEBPATH, so it's not the issue.

I had been analyzing the code and I found that function zp_loggedin is never true. The box with error about wrong login/pass is not depend of zp_loggedin's true or false..

Interesting thing is that when I run setup it's throwing me error: `Perhaps there was a problem with the upload. You should check the following files:

zp-core/admin.php

zp-core/setup.php

zp-core/setup/setup-functions.php

zp-core/setup/setup-option-defaults.php

zp-core/setup/setup-primitive.php

zp-core/setup/setup-sqlform.php

zp-core/setup/setup.css

zp-core/setup/setup_permissions_changer.php

zp-core/setup/setup_set-mod_rewrite.php

zp-core/setup/setup_themeOptions.php`

I did a little mess with versions of zenphoto when I was building this gallery but also I tried to replace this files from all the versions I used. There is still an error and the second one about version of PHP on server. It's PHP 5.2.17. Is it problem?

Maybe now you can help me? I was trying to go further through the code but I stucked in auth_zp.php file.. Maybe with the server is sth wrong? On other everything is all right.




Can't log in, but it's recognize user/password - sbillard - 2011-09-08

If you did indeed mix versions of the script files things are not likely to work. The Setup error is in indication that this MIGHT be the case, but really all setup can do is check the file times of the scripts to see if they are consistent, so maybe it is also the case that the files are correct but their last modification date is different from the rest of the install. Your best bet would be to delete all the files and reupload from the original source.

There is a plugin that loggs security access to a security log in your zp-data folder. Check to see if that log exists. If so it will tell you more about the logins. I doubt the PHP version is a problem, but we do only test with version 5.3. Anyway, if it were there would be some error message which will indicate what the problem is.

The most likely source of your problem would be how cookies are handled. If your server is not handling cookies for some reason you will not be able to login. There is also a define in globas-definitions.php for DEBUG_LOGIN change the value to true and the debug log will contain a trace of the login attempts. That will tell exactly what is failing.




Can't log in, but it's recognize user/password - choobek - 2011-09-09

I checked security logs and I found that if the log/pass is correct, the log is for example like this:

2011-09-09 12:08:02 213.5.210.124 Admin login choobek Wojciech Czub Sukces zp_admin

Like everything was all right.

I changed DEBUG_LOGIN to true and didn't see any debug_log.txt. I checked the attribute, secure rights for zp-core folder and it's 777. Why debug_login isn't showing?




Can't log in, but it's recognize user/password - sbillard - 2011-09-09

The debug log will be in the zp-data folder.




Can't log in, but it's recognize user/password - choobek - 2011-09-10

I checked in every folder and I didn't find a debug log. In zp-data folder is only setup_log.txt and security_log.txt




Can't log in, but it's recognize user/password - sbillard - 2011-09-10

Be sure you have actually updated the script on your server with that changed script. Then be sure you do attempt to login. If you have done both these there will be a debug log.




Can't log in, but it's recognize user/password - yogal - 2011-09-17

Hi,

I'd like to say that I have the EXACT same issue.

I updated my Zenphoto to the newest version 1.4.1.3 (my previous one was old by 12 releases).

The update went swiftly, as a result I was automatically logged in. But as soon as I logged out, I was not able to log back in. The symptoms are exactly the same, as choobek said. Correct password does nothing besides appending '#' to the URL. Wrong password displays error message as it should.

After reading this topic I thought that maybe something wrong went with the update, files not overwritten ? Etc.

So I made a fresh install in /zenphoto directory. At the setup screen I entered DB details (DB is the previous one but after updating) and then copied /albums from the old gallery.

As I result of fresh install I was automatically logged in. Everything worked correctly. My previous gallery was inside /gallery directory so I deleted it, renamed /zenphoto to /gallery, changed the RewriteBase from /zenphoto to /gallery and also changed the define('WEBPATH', '/zenphoto'); to define('WEBPATH', '/galeria'); in zp-config.php file.

It worked correctly, paths were correct (for static files) etc. But the login problem returned.

Heres the login debug log I got after (I think) 1 login attempt:

`
{Sat, 17 Sep 2011 10:15:47 GMT} Zenphoto v1.4.1.3[7990]
zp_getCookie(dynamic_locale)::album_session=0; SESSION[]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[]=, COOKIE=
zp_getCookie(zenphoto_auth)::album_session=0; SESSION[]=, COOKIE=
Backtrace: checkAuthorization(, )
Zenphoto_Authority->checkAuthorization called
from Zenphoto_Authority->checkCookieCredentials (lib-auth.php [747])
from require_once (auth_zp.php [71])
from require_once (functions.php [44])
from require_once (admin-functions.php [9])
from admin.php [31]
checkAuthorization: admins => (
1 => ( id => 1, user => yogal, pass => f817cf8f8c17d164f6655c57e2609e50,
name => , email => , rights => 1073750868, valid => 1, loggedin => 2011-09-17 12:14:18,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
2 => ( id => 2, user => beata, pass => ef9beffa8625f12a1b7435220128f517,
name => Beata Mikołajczyk, email => , rights => 9044, valid => 1, loggedin => 2011-09-16 19:00:27,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
)
zp_setCookie(zenphoto_auth, , -368000, )::album_session=0
zp_setCookie(zenphoto_ssl, , -368000, )::album_session=0
{Sat, 17 Sep 2011 10:16:00 GMT}
zp_getCookie(dynamic_locale)::album_session=0; SESSION[]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[]=, COOKIE=
passwordHash(yogal, somepass)[{HASH_SEED}]:f817cf8f8c17d164f6655c57e2609e50
zp_getCookie(dynamic_locale)::album_session=0; SESSION[]=, COOKIE=
Zenphoto_Administrator->save()
object(Zenphoto_Administrator)#6 (14) {
["objects"]=>
NULL
["master"]=>
bool(true)
["lastlogon"]=>
string(19) "2011-09-17 12:14:18"
["msg"]=>
NULL
["data"]=>
array(15) {
["id"]=>
string(1) "1"
["user"]=>
string(5) "yogal"
["pass"]=>
string(32) "f817cf8f8c17d164f6655c57e2609e50"
["name"]=>
string(0) ""
["email"]=>
string(0) ""
["rights"]=>
string(10) "1073750868"
["valid"]=>
string(1) "1"
["loggedin"]=>
string(19) "2011-09-17 12:14:18"
["custom_data"]=>
NULL
["group"]=>
NULL
["quota"]=>
NULL
["language"]=>
NULL
["prime_album"]=>
NULL
["other_credentials"]=>
NULL
["date"]=>
string(19) "2011-09-16 18:58:32"
}
["updates"]=>
array(2) {
["rights"]=>
int(1073750868)
["loggedin"]=>
string(19) "2011-09-17 12:16:00"
}
["loaded"]=>
bool(true)
["table"]=>
string(14) "administrators"
["unique_set"]=>
array(2) {
["user"]=>
string(5) "yogal"
["valid"]=>
string(1) "1"
}
["cache_by"]=>
NULL
["id"]=>
string(1) "1"
["use_cache"]=>
bool(false)
["transient"]=>
bool(false)
["tempdata"]=>
array(0) {
}
}

zp_setCookie(zenphoto_auth, f817cf8f8c17d164f6655c57e2609e50, , )::album_session=0
{Sat, 17 Sep 2011 10:16:00 GMT}
zp_getCookie(dynamic_locale)::album_session=0; SESSION[]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[]=, COOKIE=
zp_getCookie(zenphoto_auth)::album_session=0; SESSION[]=, COOKIE=
Backtrace: checkAuthorization(, )
Zenphoto_Authority->checkAuthorization called
from Zenphoto_Authority->checkCookieCredentials (lib-auth.php [747])
from require_once (auth_zp.php [71])
from require_once (functions.php [44])
from require_once (admin-functions.php [9])
from admin.php [31]
checkAuthorization: admins => (
1 => ( id => 1, user => yogal, pass => f817cf8f8c17d164f6655c57e2609e50,
name => , email => , rights => 1073750868, valid => 1, loggedin => 2011-09-17 12:16:00,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
2 => ( id => 2, user => beata, pass => ef9beffa8625f12a1b7435220128f517,
name => Beata Mikołajczyk, email => , rights => 9044, valid => 1, loggedin => 2011-09-16 19:00:27,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
)
zp_setCookie(zenphoto_auth, , -368000, )::album_session=0
zp_setCookie(zenphoto_ssl, , -368000, )::album_session=0
`
I even tried a different browser to check if it's a cookie/cache problem. Same thing ;/

Oddly enough I tried running setup.php again, reuploaded that file and /setup folder to /zp-core and re-ran the setup. I was logged in as a result! But only for one session. Consecutive tries resulted in the same failure...

Maybe the problem lies within database ?

Thanks in advance!

Regards,
yogal




Can't log in, but it's recognize user/password - acrylian - 2011-09-17

My collegue will surely respond later.




Can't log in, but it's recognize user/password - sbillard - 2011-09-17

This log indicates that the login cookie is not set after the login. As to why that would be, I have no clue. But if the cookie is not present then the user is not logged in.

In the case of a login to the back-end (admin pages) there should be both a cookie and a session variable. That is not the case in the logs above.

Perhaps a guess it that the cookie base is not working correctly when you have set the WEBPATH define. Any chance you can make an install that does not require you setting the define?




Can't log in, but it's recognize user/password - yogal - 2011-09-18

Hi,

thanks for the response.

I created a local installation (nginx server) with the database imported. I did not need to set the Webpath define. Everything worked well, but I am not sure if that is the only cause.

I then commented out the define inside zp-config.php file on my production server. This didn't help. I saw the paths getting messed up but login was still inaccessible. Is there anything else that setting the Webpath define changes ? That I should revert ? Because it really seems like that is the issue here.

I need the define because I have my paths set up like that:

root | V /subdir/gallery
and a domain example.com already pointing to /subdir
I'd like my gallery to be accessible at example.com/gallery, thus my WEBPATH is set to /gallery

Without it, paths are like that: example.com/zp-core/... , without the /gallery/ part.

Thanks in advance.

Regards,
yogal




Can't log in, but it's recognize user/password - sbillard - 2011-09-18

The path thing was a longshot.

Is "subdir" accessable from the WEB? That is can you access the gallery via example.com/subdir/gallery?

I think perhaps the key here is the sessions not being set. Is there anything in the configuration that prohibits sessions?




Can't log in, but it's recognize user/password - sbillard - 2011-09-18

Well, I have found a problem with the back-end sessions. (Which no one will see if cookies are working.) You should try the nightly build that will be made tonight.

If login on the back-end works with that you will probably have to enable "gallery sessions" on the gallery option tab for your site to work. Before you do that, repeat the debug experiment above on the new install. I have added some debug that MIGHT give us a clue on the cookies. Be sure to delete your debug-log.txt file before the test to get rid of the old data.




Can't log in, but it's recognize user/password - yogal - 2011-09-21

Hi!

I finally got to try as you've advised.

I downloaded the nightly (zenphoto-2011-09-19-trunk.tar.gz) and updated my production install. It works great now! With or without 'defined webpath'.

Heres the debug_log without enabling Gallery Sessions and with Webpath define COMMENTED OUT:

`
{Wed, 21 Sep 2011 15:22:18 GMT} Zenphoto v1.4.1.3[8085]
zp_getCookie(dynamic_locale)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
zp_getCookie(zenphoto_auth)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
Backtrace: checkAuthorization(, )
Zenphoto_Authority->checkAuthorization called
from Zenphoto_Authority->checkCookieCredentials (lib-auth.php [747])
from require_once (auth_zp.php [71])
from require_once (functions.php [44])
from require_once (admin-functions.php [9])
from require_once (admin-globals.php [26])
from admin.php [12]
checkAuthorization: admins => (
1 => ( id => 1, user => yogal, pass => f817cf8f8c17d164f6655c57e2609e50,
name => , email => , rights => 1073750868, valid => 1, loggedin => 2011-09-21 17:20:53,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
2 => ( id => 2, user => beata, pass => ef9beffa8625f12a1b7435220128f517,
name => Beata Mikołajczyk, email => , rights => 9044, valid => 1, loggedin => 2011-09-16 19:00:27,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
)
zp_setCookie(zenphoto_auth, , -368000, /galeria)::album_session=0; SESSION=045ca17b747fbae006bfdc90f8b1327f
zp_setCookie(zenphoto_ssl, , -368000, /galeria)::album_session=0; SESSION=045ca17b747fbae006bfdc90f8b1327f
{Wed, 21 Sep 2011 15:22:30 GMT}
zp_getCookie(dynamic_locale)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
passwordHash(yogal, somepass)[{HASH_SEED}]:f817cf8f8c17d164f6655c57e2609e50
zp_getCookie(dynamic_locale)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
Zenphoto_Administrator->save()
object(Zenphoto_Administrator)#6 (14) {
["objects"]=>
NULL
["master"]=>
bool(true)
["lastlogon"]=>
string(19) "2011-09-21 17:20:53"
["msg"]=>
NULL
["data"]=>
array(15) {
["id"]=>
string(1) "1"
["user"]=>
string(5) "yogal"
["pass"]=>
string(32) "f817cf8f8c17d164f6655c57e2609e50"
["name"]=>
string(0) ""
["email"]=>
string(0) ""
["rights"]=>
string(10) "1073750868"
["valid"]=>
string(1) "1"
["loggedin"]=>
string(19) "2011-09-21 17:20:53"
["custom_data"]=>
NULL
["group"]=>
NULL
["quota"]=>
NULL
["language"]=>
NULL
["prime_album"]=>
NULL
["other_credentials"]=>
NULL
["date"]=>
string(19) "2011-09-16 18:58:32"
}
["updates"]=>
array(2) {
["rights"]=>
int(1073750868)
["loggedin"]=>
string(19) "2011-09-21 17:22:30"
}
["loaded"]=>
bool(true)
["table"]=>
string(14) "administrators"
["unique_set"]=>
array(2) {
["user"]=>
string(5) "yogal"
["valid"]=>
string(1) "1"
}
["cache_by"]=>
NULL
["id"]=>
string(1) "1"
["use_cache"]=>
bool(false)
["transient"]=>
bool(false)
["tempdata"]=>
array(0) {
}
}

zp_setCookie(zenphoto_auth, f817cf8f8c17d164f6655c57e2609e50, 5184000, /galeria)::album_session=0; SESSION=045ca17b747fbae006bfdc90f8b1327f
{Wed, 21 Sep 2011 15:22:30 GMT}
zp_getCookie(dynamic_locale)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
zp_getCookie(zenphoto_ssl)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=, COOKIE=
zp_getCookie(zenphoto_auth)::album_session=0; SESSION[045ca17b747fbae006bfdc90f8b1327f]=f817cf8f8c17d164f6655c57e2609e50, COOKIE=
Backtrace: checkAuthorization(f817cf8f8c17d164f6655c57e2609e50, )
Zenphoto_Authority->checkAuthorization called
from Zenphoto_Authority->checkCookieCredentials (lib-auth.php [747])
from require_once (auth_zp.php [71])
from require_once (functions.php [44])
from require_once (admin-functions.php [9])
from require_once (admin-globals.php [26])
from admin.php [12]
checkAuthorization: admins => (
1 => ( id => 1, user => yogal, pass => f817cf8f8c17d164f6655c57e2609e50,
name => , email => , rights => 1073750868, valid => 1, loggedin => 2011-09-21 17:22:30,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
2 => ( id => 2, user => beata, pass => ef9beffa8625f12a1b7435220128f517,
name => Beata Mikołajczyk, email => , rights => 9044, valid => 1, loggedin => 2011-09-16 19:00:27,
custom_data => NULL, group => NULL, quota => NULL, language => NULL,
prime_album => NULL, other_credentials => NULL, date => 2011-09-16 18:58:32 ),
)
checkAuthorization: from $authcode 40002354
`
Now, as for the Gallery Sessions option. Should I enable that now, even though everything works alright, even with Webpath explicitly defined ?

Thanks for your support!

Regards,
yogal




Can't log in, but it's recognize user/password - sbillard - 2011-09-21

Thanks for the above. It does seem that cookies are not working on this site. All the data you provided is as we would expect, so I have no idea why the cookies do not get preserved. Sometimes there are browser configurations that do not store and retrieve cookies, but I would not expect that to be site dependent. (But who knows, maybe your browser does not "trust" the new site.)

Cookies are used for more than just user login. They are involved in searches and guest user passwords among other things. If you enable gallery sessions then the cookie information is preserved with session variables while the browser is active. You can leave the option reset, but if you find that some of the front-end features do not work properly you should try enabling the option and see if the problem is corrected.




Can't log in, but it's recognize user/password - Birch - 2011-10-04

Hi there. I just did an install of Zenphoto. I've been searching through all sorts of light cms applications that could focus on photsharing for a family site.
I am having the same problem as above with cookies.
I was already logged in because I was doing the set up. I uploaded a few pictures to a gallery. (actually uploaded 6 but only 2 appeared)
Then I created a user account for my husband and logged out so that I could log in as him to see how easy it would be for the average person to contribute to the site.
If I enter the password correctly, nothing happens and if I enter it incorrectly I get the 'error incorrect password/username'
-also it did not install right into my domain -FamilyHearth.ca as it was supposed to.
What steps can I take to fix the cookie issue? Im guessing that because my husband had not made any albums/uploads, that there was no 'gallery session' for him.




Can't log in, but it's recognize user/password - acrylian - 2011-10-04

So what do you have your site set to: Cookies or sessions? If neither work for you contact your host.