Re: Accessing files and directories

From: Date: Fri, 09 Jun 2000 22:41:26 +0000
Subject: Re: Accessing files and directories
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-1482@lists.php.net to get a copy of this message
In article <00b201bfcfcc$6ec140a0$52143c3e@laptop>, mjl@consultingrooms.com ("Mick Lloyd") wrote: > I am having trouble understanding exactly how to overcome an access problem. > I have read a couple of articles on authentication (eg Julie Meloni on Zend) > but I do not really want to use the standard log-in dialog box that seems to > be used in all of the examples I've seen. > > I have two part log-in form (for two user types) and authenticate the user > entered name and password from a database. This bit works OK and the user is > passed to the relevant page. However clicking a link on that page which runs > another php file results in the authentication dialog box being shown. > > I assume that this happens because I have protected the directory where all > my php scripts reside using .htaccess and .htpasswd to prevent access to the > scripts (not that they're worth stealing!). What I can't grasp is why the > first page after log-in (which is in the protected directory) is displayed > without the authentication dialog being shown, yet moving from this page to > another requires authentication. I suppose you could be passing on the username/password as part of the URL, but you'd see them in the browser, so you'd probably notice that... The first page being shown could be being read or included by the other page, so the base URL is not in the protected directory... > I know someone will suggest sessions and I am considering them, but as yet I > don't think my server (Hurricane Electric) has PHP4 installed. At least a > test with session_start() failed and I have not had a reply to my question > from their support. > > Sorry this is long winded but any help/advice much appreciated. > > Mick Lloyd > mjl@consultingrooms.com -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#1482) next »