Re: Creating useraccess to directories using apache (.htaccessand userfile) and PHP
| From: | Andy Hoffman | Date: | Thu, 07 Sep 2000 13:43:49 +0000 |
| Subject: | Re: Creating useraccess to directories using apache (.htaccessand userfile) and PHP | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2498@lists.php.net to get a copy of this message | ||
SuperFreak wrote:
> -user connects to server
> -user says to the server which username/password he wants to have (form)
> -server puts these information in some way in an apache-user-file (php?)
> -user can go to an directory (protected with an .htaccess-file or something
> like that)
> and gets an standard username/password-box
> -he types his username/password and gets access to that dir
>
> I'm using win2k with apache 1.3.12 and php 4.0.2 (server-API is CGI)
> I have no experience with compiling or something like that
This is just an initial thought... haven't tried it myself. Perhaps, once you
have the user's username & password info, use "exec()" to run htpasswd.exe in
your Apache bin directory (default installed to c:\program files\apache\bin)
and then use the file functions to create a relevant .htaccess file referencing
the created/modified password file from htpasswd.
Might work :)
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com