Tag Archives: htpasswd

Invalid command ‘AuthFormProvider’, perhaps misspelled

Invalid command ‘AuthFormProvider’, perhaps misspelled or defined by a module not included in the server configuration

yum install mod_session
yum install mod_form

To avoid the following error

You must load mod_request to enable the mod_auth_form functions

we need to load the module.
Let’s create request.conf

sudo nano /etc/httpd/conf.d/request.conf

The add the following line

LoadModule request_module modules/mod_request.so

Invalid command ‘SessionCryptoPassphrase’, perhaps misspelled or defined by a module not included in the server configuration

Add the following line to request.conf

LoadModule session_crypto_module modules/mod_session_crypto.so

How to generate a .htpasswd password with PHP?!

This worked for me.

$new_password = password_hash($old_password, PASSWORD_BCRYPT);

password_hash() creates a new password hash using a strong one-way hashing algorithm. password_hash() is compatible with crypt().
Therefore, password hashes created by crypt() can be used with password_hash().

PASSWORD_BCRYPT – Use the CRYPT_BLOWFISH algorithm to create the hash.
This will produce a standard crypt() compatible hash using the “$2y$” identifier. The result will always be a 60 character string, or FALSE on failure. Supported Options:

http://php.net/manual/en/function.password-hash.php