Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Godaddy And Test For Functionality Of Compat Library: Fail

Recommended Posts



I am trying to use the example through Godaddy and they fail the password_hash test.  Chapter four protecting passwords. Your book said this site had another work around to get that to work - could I have it?








Share this post

Link to post
Share on other sites

I found a similar question and tried this


$hash = new password_hash(8, false);

            $q = "INSERT INTO users (username, email, pass, first_name, last_name, date_expires) VALUES ('$u', '$e', '"  .  password_hash($p, PASSWORD_BCRYPT) .  "', '$fn', '$ln', SUBDATE(NOW(), INTERVAL 1 DAY) )";


but I get this error

Fatal error: Class 'password_hash' not found in html\ecommerce2\register.php on line 94

Share this post

Link to post
Share on other sites

I'm not sure why the include file is not being seen - I get thie error


Call to undefined function password_hash()


I am using this include - include('./lib/PasswordHash.php');


If I copy the function to the page it finds the function - why won't it see the include?  _ have checked the path and all the other includes work fine

Share this post

Link to post
Share on other sites

I followed the wrong link from an earlier question about the same thing.  I made the changes and here is what I have


require "lib/password.php";
$hash = password_hash($password, PASSWORD_BCRYPT);


An error occurred in script '\html\ecommerce2\register.php' on line 94:
Undefined variable: password


I have found out that I am having a problem with my IIS 7.5 - It will not see "require" - I am still trouble shooting to get the IIS correct.  I will post my finding for future reference.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...