password protection without a php page?
Posted: Tue Jun 18, 2002 1:41 pm
I'm using an apache server on Linux (Red Hat) and the cgi php module. It is possible to password protect pages and directories in apache without going through php (although it doesn't use a database).
Is it possible to use php to log someone into the apache auth setup?
What I mean is, I need to be able to check the username and password of a specific user in a mysql database, but I don't want to check it everytime any page is accessed. I'd much rather check it once then just set apache to let the user into a specific directory, and serve out regular html pages (in the belief that it will be faster than the cgi php module). I don't want to do simple javascript cookie checking because that is too easy to hack.
Is there a way to do this or am I stuck running everything through the cgi php, and checking the database at every page access?
Is it even worth it (will it use less server resourses, be faster, etc?)?
Thanks.
Is it possible to use php to log someone into the apache auth setup?
What I mean is, I need to be able to check the username and password of a specific user in a mysql database, but I don't want to check it everytime any page is accessed. I'd much rather check it once then just set apache to let the user into a specific directory, and serve out regular html pages (in the belief that it will be faster than the cgi php module). I don't want to do simple javascript cookie checking because that is too easy to hack.
Is there a way to do this or am I stuck running everything through the cgi php, and checking the database at every page access?
Is it even worth it (will it use less server resourses, be faster, etc?)?
Thanks.