Jump to content
Larry Ullman's Book Forums

Godaddy And Test For Functionality Of Compat Library: Fail


Recommended Posts

Hello,

 

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?

 

Thanks,

Jake

 

 

 

 

Link to comment
Share on other sites

I found a similar question and tried this

 

        require("./lib/PasswordHash.php");
$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

Link to comment
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

Link to comment
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.

 

Thanks

Link to comment
Share on other sites

 Share

×
×
  • Create New...