Title: [Plugin: HTTP Authentication] No REMOTE_USER ?
Last modified: August 20, 2016

---

# [Plugin: HTTP Authentication] No REMOTE_USER ?

 *  Resolved [prk-wa](https://wordpress.org/support/users/prk-wa/)
 * (@prk-wa)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-http-authentication-no-remote_user/)
 * Hi,
 * When I go to /wp-admin/ which redirects to /wp-login.php the http-authentication
   plugin fails with “ERROR: No user found in server variables.”
 * I’ve inserted a debugging loop which prints all the env variables seen at that
   stage, code below:
 *     ```
       foreach($_SERVER as $key_name => $key_value) {
       print $key_name . " = " . $key_value . "<br>";
       }
       ```
   
 * This shows that the REMOTE_USER variable is missing (as is AUTH_TYPE).
 * However, if I put that same code snippet in a getenv.php file in the /wp-admin/
   directory and go to it in my web browser, I can see that the REMOTE_USER (and
   AUTH_TYPE) are correctly set.
 * Any idea why, when going through wp-login.php the REMOTE_USER variable isn’t 
   available to the http-authentication plugin?
 * Does something intercept / block it?
 * Parameters from getenv.php:
 *     ```
       REMOTE_PORT = 22925
       REMOTE_USER = prk
       AUTH_TYPE = PUBCOOKii
       GATEWAY_INTERFACE = CGI/1.1
       ```
   
 * Parameters from within http-authentication.php:
 *     ```
       REMOTE_PORT = 14338
       GATEWAY_INTERFACE = CGI/1.1
       ```
   
 * Any help gratefully appreciated.
 * prk.
 * [http://wordpress.org/extend/plugins/http-authentication/](http://wordpress.org/extend/plugins/http-authentication/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [prk-wa](https://wordpress.org/support/users/prk-wa/)
 * (@prk-wa)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-http-authentication-no-remote_user/#post-2954646)
 * Gah, of course after I post, I work it out, and it’s PEBCAK.
 * Turned out I didn’t have the wp-login.php Auth protected, so whilst I was seeing
   the REMOTE_USER in the wp-admin/ directory, it wasn’t when calling wp-login.
 * Another .htaccess file and all is well.
 * Sorry all.
 * prk.
 *  [Pirco the One and Only](https://wordpress.org/support/users/pirocpiroccom/)
 * (@pirocpiroccom)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-http-authentication-no-remote_user/#post-2954804)
 * hi, how did you auth protect the wp-login.php?
 *  Thread Starter [prk-wa](https://wordpress.org/support/users/prk-wa/)
 * (@prk-wa)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-http-authentication-no-remote_user/#post-2954805)
 * A .htaccess in the base WP directory (same place the wp-login.php file is) containing
   a files block:
 *     ```
       <Files wp-login.php>
               AuthName "WordPress"
               AuthType Basic
               AuthUserFile /path/to/passwords
               require valid-user
       </Files>
       ```
   
 * Make sure your apache2 conf allows .htaccess files.
 * prk.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[Plugin: HTTP Authentication] No REMOTE_USER ?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/http-authentication.svg)
 * [HTTP Authentication](https://wordpress.org/plugins/http-authentication/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/http-authentication/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/http-authentication/)
 * [Active Topics](https://wordpress.org/support/plugin/http-authentication/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/http-authentication/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/http-authentication/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [prk-wa](https://wordpress.org/support/users/prk-wa/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-http-authentication-no-remote_user/#post-2954805)
 * Status: resolved