title: Authentication with PHP 8.0-Password protecting files and folders with .htaccess and .htpasswd
body: <p>I'm trying to password protect certain folders and files in my Apache directory. I place the .htaccess file in the folder and when I go to that directory, the browser asks for Authentication.</p>
  <p>I tried creating a password from the command-line with the command, htpasswd -c .htpasswd client.
  The client username already exists in my .htpasswd file, but it doesn't prompt me to generate a new password.</p>
  <p>My .htaccess file looks like this:</p>
  <pre><code>AuthUserFile C:/Apache24/htdocs/PHPandMySQL-2020/.htpasswd
  AuthType Basic
  AuthName &quot;My Protected Folder&quot;
  Require valid-user
  </code></pre>
  <p>and my .htpasswd looks like this:</p>
  <pre><code>client: f.i9PC3.AtcXE
  </code></pre>
  <p>The authentication works on the folder. But when I go to the command-line, and type: htpasswd -c .htpasswd client. It doesn't prompt me to generate a new password.</p>
  <p>Can anyone give me a hand here?</p>