JohnHalsey Posted April 10, 2014 Posted April 10, 2014 I've just put a new site up on a live server. The site works as it should, but when I go to log in to the back end I get the below error. Unable to generate password hash I found a post on here about resetting the password and running a small script in a template to reset password, then running a page from the that template on the server to run the script, then I should be able to log in. But that hasn't worked. I added the code to the template and uploaded it to the site, ran the page and got an internal error (looks like 500 error). Any advice is appreciated. Thanks
alan Posted April 11, 2014 Posted April 11, 2014 Hav you turned on debug in config.php? That invariably tells you something sometimes everything you need to know.
SiNNuT Posted April 11, 2014 Posted April 11, 2014 I think it is because the live hosting is running an antiquated version of PHP. You should check if the version =>5.3.8 PW uses blowfish hashes for the password system if available. A PHP version conflict between dev and live servers, where dev has =>5.3.8 and live has not, will generate the notices you encountered in my experience. Instead of trying to work around this it would be best to ask the hoster to upgrade.
JohnHalsey Posted April 11, 2014 Author Posted April 11, 2014 I ran it again in debug mode and got this. I've starred out my password Fatal error: Exception: Unable to generate password hash (in /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Password.php line 270) #0 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Password.php(93): Password->hash('****') #1 [internal function]: Password->___setPass('****') #2 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Wire.php(359): call_user_func_array(Array, Array) #3 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Wire.php(317): Wire->runHooks('setPass', Array) #4 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Password.php(73): Wire->__call('setPass', Array) #5 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Password.php(73): Password->setPass('****') #6 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/modules/Fieldtype/FieldtypePassword.module(72): Password->__set('pass', '****') #7 /www/sites/bf5/fe5/www.reppro-kids.co.uk/web/wire/core/Page.php(517): FieldtypePassword->sanitizeValue(Object(User), Object(Field), '****') #8 /www/sit in/www/sites/bf5/fe5/www.reppro-kids.co.uk/web/index.php on line 216 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. My clients hosting is with LCN. I've sent them a support ticket to find out what version they're running.
adrian Posted April 11, 2014 Posted April 11, 2014 Have you read this thread: https://processwire.com/talk/topic/3528-when-logging-in-to-admin-getting-unable-to-generate-password-hash/
JohnHalsey Posted April 11, 2014 Author Posted April 11, 2014 LCN came back to me and said they currently using v 5.3.3 with plans to upgrade to 5.4 but no exact date. I'll go through that link Adrian just posted.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now