Re: PHP_AUTH_USER not set?

From: Date: Fri, 14 Jul 2000 13:01:17 +0000
Subject: Re: PHP_AUTH_USER not set?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6630@lists.php.net to get a copy of this message
No, you definitely don't need any .htaccess stuff. In fact, this is most likely your problem. If you configure Apache to do authentication via .htaccess (or directly from your httpd.conf) then you can't use PHP to authenticate on that same resource. -Rasmus On Fri, 14 Jul 2000, Magnus Hammar wrote: > > I have a simular problem. > I think it has to do with apache-configuration. > Look for a line with this information in http.conf: > -------------------------------- > # This controls which options the .htaccess files in directories can > # override. Can also be "All", or any combination of "Options", > "FileInfo", > # "AuthConfig", and "Limit" > > > AllowOverride All > -------------------------------- > > This is probably set to "AllowOverride None". > > It should be in the part of configuring .htaccess... > I'm not sure, but it could be the solution. > > Does anyone else have a better idea of this? ;) > > /Magnus Hammar > ------------------------------------------- > >I'm beginning with PHP and have problem where PHP_AUTH_USER does not > >seem to be set. Not sure if this should be sent to install list, but > >anyway. > > > >- PHP 3.0.13 > >- Debian 2.0.36 > >- Apache 1.3.12/SSL 1.39 > > > >I've followed all the examples to the letter: > > > > if(!isset($PHP_AUTH_USER)) { > > // Username and Password must be present > > Header("WWW-authenticate: basic realm=\"test realm\""); > > Header("HTTP/1.0 401 Unauthorized"); > > exit; > > } else ... > > > >But, authorization always fails and it keeps popping up the > >username/password dialogue. I.e. it seems as if PHP_AUTH_USER is never > >set. Thought it may be with options for php build, and rebuilt a few > >times: lastly with > >

« previous php.general (#6630) next »