Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Cannot stay logged in as admin
I can log in as admin but get logged out as soon as I visit any page beyond the first one
Page:  1  2  next 
Avatar
MartinTB #1
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: Cannot stay logged in as admin
I created a dokuwiki and have been using it without trouble for some time, but now cannot get in as admin (and I don't know the passwords of any of the other logins).

What happens: I (apparently successfully) log in as admin (Log Out appears at the top right and an "Edit this page" icon appears to the right of the page I am viewing. However, as soon as I visit another page Log Out becomes Log In and the pencil icon disappears. If, instead of trying to go to another page, I click on the Admin link at the top I get "Permission Denied. Sorry, you don't have enough rights to continue." If I try to edit the page (for the one page where the edit icon is visible) I get "This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong." If I click on Log Out at the top, nothing happens.

Things I have checked: The PHP version (my site is with a shared hosting provider) is 5.6.24 and session variables are enabled (I checked by running a little test script that increments the session count). I can provide more details about the PHP version using phpinfo() if needed. I am not connecting via a proxy.

I am stumped and would appreciate any help. I found one similar post, but it was from very long ago and the possible explanations suggested then (PHP sessions not working or interference from a proxy) don't seem to apply in this case. I have access to all of the dokuwiki files via cpanel.

Thanks in advance!
Avatar
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Is there anything interfering with your cookies?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
MartinTB #3
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
I just tested and yes cookies are working. I also checked for cookie-related PHP settings via phpinfo() in case it means anything to you -

_COOKIE["DOKU_PREFS"]    list#thumbs
_COOKIE["DokuWiki"]    6a84aced9c41081774442b56e2c4851a
_COOKIE["_ga"]    GA1.3.1981181080.1486028349
_COOKIE["mailmunch_second_pageview"]    true
_COOKIE["PHPSESSID"]    2f39f2a0b6fc77b2fa90533102852595

_SERVER["HTTP_COOKIE"]    DOKU_PREFS=list%23thumbs; DokuWiki=6a84aced9c41081774442b56e2c4851a; _ga=GA1.3.1981181080.1486028349; mailmunch_second_pageview=true; PHPSESSID=2f39f2a0b6fc77b2fa90533102852595

_ENV["HTTP_COOKIE"]    DOKU_PREFS=list%23thumbs; DokuWiki=6a84aced9c41081774442b56e2c4851a; _ga=GA1.3.1981181080.1486028349; mailmunch_second_pageview=true; PHPSESSID=2f39f2a0b6fc77b2fa90533102852595

Is there perhaps some settings file I can change outside dokuwiki (via cpanel) to get the user privileges sorted out? I can live with losing all information about users and re-instating them manually. I just wouldn't want to lose the wiki content.
Avatar
andi (Administrator) #4
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Have you tried using a different browser? a different network? Eg. log in from your phone? I'm not sure what's going on but that should be tried next.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
MartinTB #5
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thanks for these very good suggestions Andi. I have now tried logging in via internet explorer (I usually use chrome) - but it made no difference. I also tried logging in via my phone, using a different internet service provider. On the phone I get served the mobile version of the wiki, but otherwise everything is also the same - when I try to access the admin settings I am told that I am not logged in, when I try to edit the first content page shown after apparently being logged in I am told I don't have access rights and when I move to another page I am no longer logged in.

I think it is possible that my hosting provider changed something about how their web server (apache I think) is set up, but I wouldn't know what to tell them to check for. If there is some sort of dokuwiki setup file that I could manually edit or delete (I have full access to the site) that might be the best way.
Avatar
andi (Administrator) #6
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Very weird. At least we confirmed that it's something server side. But I have no idea what. I'm not even sure how to debug it.

One idea would be to install a second fresh, empty DokuWiki next to the other just to see if it behaves the same?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
andi (Administrator) #7
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Also you can create a new user in conf/users.auth.php - the password is hashed, but any hash understood by DokuWiki can be used. Eg. a simple MD5 will suffice. But I doubt your problem is related to the used user.
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
MartinTB #8
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
Thanks Andi. I created a new user by adding a line to editing conf/users.auth.php. The line contains the user name and other details, including an MD5 hash of the password. I can log in using the new user name and password, but after that the behaviour unfortunately remains the same as before - I am unable to actually edit the current page and am logged out as soon as I click on another page.

I will try to install a second copy of dokuwiki, but I'm not sure if that will be possible. I installed the first copy using a installation system provided by my hosting provider - softaculous.
Avatar
MartinTB #9
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
I have now installed a second copy of dokuwiki and can log in, access the admin tools, create pages etc. However, the behaviour is a bit strange. When I make changes to pages they sometimes appear, sometimes not. When I click on the edit icon for a page the editor appears, but the content of the page is not loaded into the editor.

It feels as if there is some sort of caching going on server-side that messes things up. Any ideas?
Avatar
andi (Administrator) #10
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
could it be that the time is somehow messed up on the server?
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
MartinTB #11
Member since Apr 2017 · 6 posts
Group memberships: Members
Show profile · Link to this post
I checked the date and time (using the php date function) and it is correct. However, if I refresh the page the displayed time remains unchanged. It only changes if I add a spurious parameter to the URL.

Is it possible that caching could be set too aggressively in Apache? And how would I communicate that to my hosting provider? (By the way, thanks so much for taking an interest in this.)
Avatar
RichardS #12
Member since Jun 2013 · 4 posts
Group memberships: Members
Show profile · Link to this post
Subject: Any solution yet?
Hi Martin, I'm having a similar problem with a dokuwiki instance hosted on the web by a third-party provider. I found this thread while looking for a solution - did you get it sorted out in the end?
Avatar
andi (Administrator) #13
User title: splitbrain
Member since May 2006 · 3330 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Might be this problem: https://github.com/splitbrain/dokuwiki/issues/1594
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Avatar
freecicero #14
Member since Apr 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
I found this thread and I am having the exact same problem.  I use Hostmantis as my host, and like the writer I have one wiki that seems to work fine, and another (the older of the two) which has this problem.

I followed the link to github and I made the change, but so far I am still having the same problem.

Any other links to follow and try?

thanks
Avatar
freecicero #15
Member since Apr 2018 · 7 posts
Group memberships: Members
Show profile · Link to this post
Well those changes did not help and now I cannot get to the admin panel at all.  I can log in, and I have the link to Admin, but as soon as I go to another page, or even REFRESH the current page, I am logged out.

Any idea how I should proceed?

thanks!

PS - Also, I have followed the instructions here (the deleteme part) for adding a new admin user: 

https://www.dokuwiki.org/faq:forgotten_password

If I log in using deleteme it lets me login, but immediately has the same issue when I try to access the admin panel - I get taken back to the login screen with the message:  "Permission Denied Sorry, you don't have enough rights to continue."
This post was edited on 2018-04-06, 16:39 by freecicero.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2018-09-20, 11:08:27 (UTC +02:00)