Re: Why is this not working
| From: | Tyrone Mills | Date: | Thu, 17 May 2001 22:27:08 +0000 |
| Subject: | Re: Why is this not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53333@lists.php.net to get a copy of this message | ||
This works for me...
$update = exec ("/usr/local/apache/bin/htpasswd -b ./.htpasswd $username
$password");
Just make sure that the user that Apache runs under has the appropriate
permissions to the .htpasswd file.
Tyrone
"YoBro" <nospam@brochures.co.nz> wrote in message
news:<9e1fcd$pir$1@toye.p.sourceforge.net>...
> After much investigation through many newsgroups and websites, I found out
> that this is the way you can execute a unix apache command to add a user
to
> the htpasswd list with PHP.
>
> Problem is, it doesn't add any information to the htpasswd file.
> Note: The example below is...
> domain = my user name
> abc = user name to add to htpasswd list
> pass = password to add to htpasswd list
>
> <?php
> passthru ("htpasswd -b /users/domain/.htpasswd abc pass");
> ?>
>
> Please Help if you can.
>
> Cheers,
> YoBro
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>