Jump to content

"Unable to generate password hash" when log in after site is deployed


JohnHalsey
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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...