Jump to content

Login Issues on a new local install (already searched, checked guides etc)


-aj-
 Share

Recommended Posts

Hi All 

It's been a while since I've done any projects in PW and I wanted to check out some of the new hotness going on in dev branch, so I cloned the repo down etc

Install went without any hitches, no warnings, all files/dirs appear to be created and writable etc. 

Problems begin when I go to log in to the admin section. After entering my username and password the page refreshes and just dumps me right back on the login page, with no errors, acknowledgements of success/failure etc I just keep getting hit with the same login screen.

If I try  a different (intentionally wrong) password it will throw a login failed error. If I try to many attempts too quickly I run into the login throttling, but when my details are correct it throws no errors yet doesn't let me into the admin at all. 

The front end of the default site works perfectly - no 500's, 404's etc 

I tried switching to the master branch, and doing another install from scratch, same problem. 

1 thing I did notice when going through the install is that admin username is meant to be a-z 0-9 only (as per the field label), but it won't validate this or throw any errors when you use other characters (both client side and server side), my first install attempt had the username wire_admin, subsequent fresh installs have just used lowercase alphabet characters.

My password currently includes symbols, caps etc, is there any restrictions on them in passwords? (and if so, why???) 

Any length limitations on usernames or passwords that could be causing issues? 

Searched for login errors on the forums, looked through the troubleshooting guides etc and none of them seem to mention my scenario (links / htaccess all working perfectly, just login issues, no errors thrown)

Any help would be appreciated

Thanks, 

Alex

Link to comment
Share on other sites

Only thing I see for username / pass is this....

Name: Any combination of letters (a-z), numbers (0-9), dashes or underscores (no spaces).

Pass: Password must be at least 6 characters and have at least 1 letter and 1 digit. Password may not have whitespace.

So I guess symbols are not allowed...

or maybe keyboard suddenly changed to other language?

Link to comment
Share on other sites

What bwakad lists for usernames is correct - no symbols are allowed.

However, symbols are allowed in passwords.

So, I am guessing the installer doesn't let you know that it has replaced the symbols in your username with dashes. Can you take a look at the name field in the pages table (via PHPMyAdmin etc) to confirm that the username has been changed from what you entered, and does the login work fine if you try it with the altered name?

Link to comment
Share on other sites

@adrian -

I was looking in the config file and see the host details are there,

but I gues if one change it, they would need to obtain a new hash for that,

AND change the DB as well?

The config file contains access details for the database (including the host) - is that what you are talking about? I don't think that is related to what -aj- is asking. I think he is just referring to his superuser account for logging into PW. Am I confused maybe?

Link to comment
Share on other sites

As I've mentioned, I have searched through the forums looking for login and password related posts, and have tried some of the fixes mentioned. 

My password is not incorrect, but to be sure I too have tried programatically resetting it using snippets found on the forum, then trying the new password and the same behaviour happens.. every time..

I've tried turning on debug, but it's not immediately useful as no error is thrown when I use the correct username and password, I just do not proceed to the admin. I guess I could start hacking core to throw more info or errors out during the login process but I'd rather not.. it's literally a stock standard install running on MAMP, I've had PW installs on my local machine before. 

Link to comment
Share on other sites

Do you actually end up at the login screen with username and password prompts, or does it say "Continue"? If the latter, then it sounds like the user you are trying to log in with does not have edit permission.

Of course this doesn't really make sense as the admin user that gets created during install has superuser permission automatically. But you could dig around in the DB tables and make sure the user has edit permission, or just programmatically add it.

Sorry, maybe someone else will have a bright idea :)

Link to comment
Share on other sites

I end up at the login screen with blank username and password fields.

Sessions folder is 755, but there are no sessions in it, could this be the issue? from other posts on the forum I've read pw should throw an error or exception if sessions fail to write. 

Pre-login 

https://cloudup.com/ikThn76DC7j

Click the login button and I get this

https://cloudup.com/c74cMDvreF1

Thanks, 

Alex

Link to comment
Share on other sites

Sorry if my suggestions came across as doubting / obvious - just wanted to rule some things out. It might be the session issue - of course 755 doesn't mean much if the owner/group doesn't match the apache user. Maybe try making it 777 temporarily to see if that fixes things and then worry about what it should actually be, based on your server config.

Link to comment
Share on other sites

That's ok, I understand that you have no way of knowing 100% everything I've tried, or my setup, knowledge/skill level etc

Tried 777, no change, I'm 100% certain that apache is running as my mac user (ie the user that also creates the folders etc), I'm really struggling to work out why this would be an issue for this PW install when all my local installs of WP are working perfectly and they require a very similar permission/user setup structure etc

Link to comment
Share on other sites

Does anything from this post from Ryan help: https://processwire.com/talk/topic/4011-cannot-login-to-admin-area/?p=39870

In particular:

disable the "session fingerprinting" option in your /site/config.php and change the default session name from 'wire' to whatever PHP's default is:
$config->sessionName = session_name(); 
  • Like 2
Link to comment
Share on other sites

Thanks for that post, my searches didn't unearth that. I know that session auto start is on, so I will have to see if I can turn this off just for this vhost via php.ini (I need it for some of my other local installs like WooCommerce). 

I'll give it a shot and see how I go, thanks for your persistence with helping me diagnose the issue.

EDIT: resolved the login issue by setting session.auto_start to 0 for that vhost. 

Aside from my problems, is the issue with the admin usernames not throwing errors/validating something worth raising on github? 

  • Like 1
Link to comment
Share on other sites

-snip-

Aside from my problems, is the issue with the admin usernames not throwing errors/validating something worth raising on github? 

Yes, i think so. Especially if adrian is right and PW silently goes replacing symbols with dashes (won't be able to test myself the coming days).

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...