on 22/08/02 1:10 PM, Roger Lewis ([EMAIL PROTECTED]) wrote:

> Justin,
> Thanks again.  I've been doing some more research on .htaccess.  The problem
> I see is that it is high maintenance, i.e. I've already got a MySQL table of
> users with username and password.  To use .htaccess, you have to have a
> htpasswd file containing duplicate usernames and passwords, and this would
> have to be in sync with the MySQL table.

NO.  All the .htaccess file would do in this case is prevent the files from
being served over http AT ALL.  Instead, the files are served THROUGH a PHP
script which checks for authenticated user first.

> I have found that there is an Apache module, mod_auth_mysql, that allows
> .htaccess to access a MySQL database for the information it needs.  This
> module is available at
> http://www.diegonet.com/support/mod_auth_mysql.shtml.  Problem is you have
> to install the mod and recompile Apache, I think.  And I don't know how to
> do that yet.  However, if everything works in accordance with my
> interpretation, you should be able to put an .htascess file into the
> directory you wish to protect and Mod_auth_mysql will communicate with the
> database to authenticate the users.

You don't need anything more that a standard Apache, PHP and MySQL install.

Read my last email again, and again, and again.  It (hopefully) clearly sets
out what you need, and how each part interacts.  I don't know how to be much
clearer, without doing it for you (which I can do, at a cost :))

Justin French

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to