PHP and Apache Authentication
| From: | Glenn MacGregor | Date: | Fri, 04 Jun 2004 21:06:22 +0000 |
| Subject: | PHP and Apache Authentication | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187652@lists.php.net to get a copy of this message | ||
Hi All,
I am trying to protect portions of my website. I am using pache 2.x and php4.X. I don't want to use apache authentication within the Directory directive because I can't utilize sessions if I do that. So I want to use PHP to authenticate from a postgresql database.
This works fine on the pages I have put it on, the problem is I want it on all pages in a given directory but I don't want to edit every page in that directory. Is there a way to configure apache to include something in every response?
Example:
http://test/v1/v1.php
v1.php:
...
include(../auth.inc)
...
This file is protected.
http://test/v1/v1-test.php
v1-test.php doesn't contain the include above, but I still want to protect it.
Thanks
Glenn