title: HTTP Authentication won't work on localhost Zend WAMP server
body: <p>I've been working through PHP, MySQL, Javascript &amp; CSS 2nd edition by Robert Nixon (O'Reilly 2012). I've managed to set up a database on my WAMP server (Zend server).</p>
  
  <p>The book then shows how to authenticate a username and password. i managed to create a few usernames with passwords which have been added to my database successfully. I know because I connected to the database, read the result of a SELECT query and echo 'd them out to the browser.</p>
  
  <p>When I then try to login with authentication here:</p>
  
  <pre><code>if (isset($_SERVER['PHP_AUTH_USER']) &amp;&amp; isset($_SERVER['PHP_AUTH_PW'])) {....perform database query and compare username/password....}
  </code></pre>
  
  <p>none of my usernames and passwords work. The window 'Authentication Required' pops up again in both Firefox and IE. The PHP code isn't getting past the if statement (I've tried sending output to the browser immediately before and after the if statement) so it seems that the username and password entered are not being passed to the PHP server.</p>
  
  <p>I made sure that 'localhost' is authorized specifically on Firefox, but still no success.</p>
  
  <p>Any suggestions would be welcome.</p>
  
  <p>Gary</p>