Can't login to panel in version 2.2.3

I have just uploaded one of my sites to a public server and I can’t log in into the panel. When I log in with correct credentials I get redirected back to the log-in page WITHOUT any error message. If I use incorrect credentials I get an error message.

I also tried a fresh kirby 2.2.3 installation and had the same problem after installing. I also tried an older verision of kirby (2.1 I think) and it worked without a problem.

All my frontend pages are working, I’m using a vanilla kirby .htaccess file. I get no js errors in the console when I try to log in. I can’t log in with all browsers.

Does anyone have any idea about this?

Thats Interesting for Couple months i had the Same Problem whit 2.2.3, after who i have create my account, i have delet it and creat it again and it works

I tried deleteing, and recreating it. It doesnt work :frowning:

Hmm, and when you delet the kirby installation and copy the files again?

no, I even just intalled kirby withot anything else. created first user. and couldn’t log in.

or try it whit a another browser?

Edit: Delet your Cashe and Cookies

I did it. it doesn’t work. also tried with different browsers.

i have no more ideas sorry :frowning: Maybe @lukasbestle or @texnixe can Help you, Good Luck!!

Some basic questions:

  • Which PHP version is installed on the server?
  • Which webserver do you use (Apache, Nginx etc.)?

Also, can you find anything in the php error logs (with debug turned on)?

PHP Version 5.6.17 on apache.2.2

I turned the debug on with
c::set(‘debug’,true)`
but I don’t get any php errors nor can I see any in error logs (last entry from december!)

I definitely see that a cookie is being created (and I also debugged the process with printouts all the way until the cookie and the redirect after) for the user to be logged in, so it seems that the bug is in the filter somewhere, I’m trying to find where the filter is being applied to deal with it there…

That all looks good.

Other people had a very similar issue before.
The solutions there are related to the session store and the Varnish cache proxy. Maybe some of that applies to your server as well?

I don’t think so. I don’t know if its the best way to check but there is a site that you can check for the chace on it - and it says it’s not working.
http://www.isvarnishworking.com/

Also, is the login problem is only happening with the latest version of kirby, does that mean anything?
I have a site running with an old version it’s working fine.

The weirdest thing is that a month ago I also had a site using kirby 2.2.3 running on this server and it worked fine (this is my staging server, my client already bought 3 kirby licenses and we’re planning on 2 or 3 more).

I’m still playing with kirby trying to figure what’s happening, will keep yall updated.

Could you try and test with the Kirby 2.3 beta?

What is different between the site that worked fine and the current one? Installed plugins, fields etc.?

I actually tried uploading the previous one to the server again, just to test. and it doesn’t let me log in either…

I did figure out that the problem is the session variables - more specifically both

s::get('kirby_auth_secret')
s::get('kirby_auth_username');

are still returning empty values…
I’m trying to figure out why.

I made sure the session is getting written. and it’s partially so, I can see in the file that parts of it are being written and parts arent.

specifically I get the csrf, kirby session fingerprint and activity in… on the other hand I don’t get those two values.

it also seems like when I try to log in, it gets deleted immidietly after and I get an empty session.

EDIT
I now see that I do get the variables saved. but as soon as I get redirected that session gets destroyed for some reason

Something weird is happening.

I’m looking at the cookie and the session file.
It looks like in the cookie there is a variable called kirby_session and it’s equal to the session ID. BUT thep PHPSESSID is different.
So is php trying to load the new PHPSESSID everytime? I don’t have much experience with sessions… so does anyone know how that works? get around it?

anyway, signing off for a bit.

Thanks for looking into this. In this post, @bastianallgeier already suggested the problem might be session related. @bastianallgeier, any news on that?

We had some similar issues here in the forum where the root cause apparently couldn’t be found.

I resolved it. But I don’t like the solution. So I’m still waiting for @bastianallgeier to respond.

I basically switched to PHP 5.6.17 fastcGI, and then the log in worked.

What did you use before? The Apache PHP module? This may even be a good hint.