Difficulty logging into an old Kirby install - hashPassword doesn't seem to work?

I have an old Kirby install (3.2.5) that was migrated to a new server that is running on PHP 8.3

I was confused because I wasn’t able to log in with my saved credentials. Then I tried manually setting the .htpasswd by using PASSWORD_BCRYPT to create a hash, which didn’t work.

Then I moved the accounts directory and when creating a new user, upon submitting I get an error “The passwords do not match” - but a user is created with a hash.

Attempting to login with the newly created credentials does not work.

I then noticed that the .htpasswd contains the unhashed plaintext password, I also noticed that php -r “require ‘./kirby/bootstrap.php’; echo \Kirby\Cms\User::hashPassword(‘TEST’);” seems to simply output TEST - is the hashPassword method broken somehow?

Some notes in case they are relevant:

  1. Server is using runcloud
  2. I had to rename the ‘go’ function in kirby/config/helpers.php as for some reason define(‘KIRBY_HELPER_GO’, false); in the root index.php doesn’t seem to have an effect in resolving a function name conflict

The reason for this behavior is probably due to the PHP version, with which Kirby 3.2.5 is incompatible:

Ah ok! I upgraded the install to 3.10.1.2 and it is working again.

I expected to see a more explicit error but this made it clear, thanks for the tip.

2 Likes

We have one now, but didn’t in old Kirby versions. Glad you got it working.