RE: [Phplib-users] two different log-In forms
Brought to you by:
nhruby,
richardarcher
From: Brian P. <bp...@ct...> - 2002-11-06 16:44:32
|
You don't have to unauthorize the user. I'm using PHPLib to authenticate about 5 different sites on one server. Each has it's own authentication table and permission scheme. The trick I used was creating a separate local.inc for each site. Each local.inc uses different session, auth, & perm classes. Each site also uses it's own database (although it doesn't necessarily have to). Just take a local.inc file and strip out all the extraneous stuff. Then include this on each page within the area that needs to be protected. First Site Folder local.php index.php globals.php Second Site Folder local.php index.php globals.php (make sure your local.php class declarations don't interfere with the global local.inc class declarations) I setup all my pages to include "globals.php" on the first line. Each globals.php then includes the corresponding local.php file (and any other necessary include files) and defines any global variables. This is really how PHPLib should be setup to work (even though the docs are somewhat misleading in this regard). It's silly to try and keep all this stuff in one HUGE local.inc file (which gets parsed by ever single PHP hit). The only downside to this method is that your password could be compromised if PHP didn't work for some reason. As long as you have control of your server, this shouldn't be a problem. If you're concerned about this, put all your local.php files in a separate folder outside the document root (naming them uniquely of course). bpopp -----Original Message----- From: Guenther Theilen [mailto:th...@eq...] Sent: Wednesday, November 06, 2002 7:57 AM To: php...@li... Subject: Re: [Phplib-users] two different log-In forms Hi Benjamin, Benjamin Boksa <b....@si...> schrieb: > Should his authorization for area A be kept, when he enters area B, or > can he be unauthorized in area A? He can be unauthorized. Regards Guenther ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Phplib-users mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phplib-users |