Best way to use PHP to encrypt and decrypt passwords? [duplicate]

You should not encrypt passwords, instead you should hash them using an algorithm like bcrypt. This answer explains how to properly implement password hashing in PHP. Still, here is how you would encrypt/decrypt: $key = ‘password to (en/de)crypt’; $string = ‘ string to be encrypted ‘; // note the spaces To Encrypt: $iv = mcrypt_create_iv( … Read more

Laravel requires the Mcrypt PHP extension

Do you have MAMP installed? Use which php in the terminal to see which version of PHP you are using. If it’s not the PHP version from MAMP, you should edit or add .bash_profile in the user’s home directory, that is : cd ~ In .bash_profile, add following line: export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH Edited: First you should … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)