RE: [PHP-DB] HTTP authentication
| From: | Mikusch, Rita | Date: | Tue, 22 Jan 2002 18:43:47 +0000 |
| Subject: | RE: [PHP-DB] HTTP authentication | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-16058@lists.php.net to get a copy of this message | ||
I had the same problem . . . couldn't get HTTP authentication to work. It
turn out that I had to email my ISP and ask their sysadmin to set the HTTP
authentication to work individually for each directory I needed it for. I
can't remember the apache details -- they needed to add a line to some admin
file.
Unfortunately the sysadmin was a little absent minded and FORGOT that she
was supposed to add this line to some admin file to get the HTTP
authentication to work. I spend a LOT of phone calls and emails trying to
explain to her that I was doing my part correctly and there was something
wrong on her end.
Anyway, I guess what I'm trying to say is double check your apache set up,
perhaps there's an admin file you need to edit! Sorry I can't tell you which
one, as I know very little about Apache. Of course if I keep having to tutor
my sys-admin over the phone, I'll eventually be an expert!
Rita.
-----Original Message-----
From: news.php.net [mailto:k.schaaps@chello.nl]
Sent: Sunday, January 20, 2002 6:17 PM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] HTTP authentication
Dear Beau,
Thanks for your answer, and indeed.. it doesn't have too much to do with
databases, although if an example of authentication using a database would
be great.
And I was a bit vague on which webserver (indeed Apache). And I do have
command line access. However in my initial message I said that directory
authentication (with .htaccess) doesn't work. And I've tried more than once
to get it to work.
So if you could still help me, or anyone else I would greatly appreciate it!
Yours,
Kevin
"Beau Lebens" <B.Lebens@curtin.edu.au> wrote in message
news:A2B098B4E624D511BED900508BB92A5701CA4DBA@exmsb02.curtin.edu.au...
> not that this has anything to do with databases... ([php-db])
>
> assuming;
> 1. you are using apache
> 2. you have command-line access to your server
> 3. your webhost has htaccess enabled and configured to use ".htaccess" as
> the security file
>
> you should be able to drop a file called (usally) ".htaccess" into the
> directory you want to secure. you then go to the command line and do
> something like
>
> $ htpasswd -c "/home/you/htbin/.htpasswd" username
>
> which creates (-c) the password file (/home/you/htbin/.htpasswd) and adds
a
> user called "username" to it. when you hit enter it will ask for a
password
> (twice).
>
> now the .htaccess file which is in your "to-be-secured" directory needs to
> look something like this;
>
> ==== snip
> AuthUserFile /path/to/htpasswd/file
> AuthName "Name to Appear in Box"
> AuthType Basic
>
> <Limit GET POST>
> require valid-user
> </Limit>
> ==== snip
>
> that example looks in "/path/to/htpasswd/file" and confirms that the
> user/pass combintation is a "valid-user" (any valid combo from the file)
and
> if so, allows them access.
>
> you can get more information on all of this in the apache docuemntation at
> apache.org, search for "htaccess" and you might also be interested in the
> groups ability of the system, so search for "htgroup" (i think)
>
> hth
>
> beau
>
>
> // -----Original Message-----
> // From: news.php.net [mailto:k.schaaps@chello.nl]
> // Sent: Monday, 21 January 2002 3:36 AM
> // To: php-db@lists.php.net
> // Subject: [PHP-DB] HTTP authentication
> //
> //
> // Heya,
> //
> // I'm trying to find out how http header authentication works.
> // For some reason
> // my webserver won't do it on a directory basis. But the
> // problem is that the
> // documentation that came along with the PHP package doesn't
> // help me much.
> //
> // Can you guys give me a working example on how to use and
> // implement it?
> //
> // I would really appreciate it,
> //
> // Kevin
> //
> //
> //
> // --
> // PHP Database Mailing List (http://www.php.net/)
> // To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> // For additional commands, e-mail: php-db-help@lists.php.net
> // To contact the list administrators, e-mail:
> // php-list-admin@lists.php.net
> //