Page 1 of 1

system()

Posted: Tue Dec 03, 2002 12:30 pm
by oldtimer
I am reading up on this but do not quite understand it.

I am wanting to update a htpasswd file from the web instead of command lining it. I know I can just write to a file but I would rather use the htpasswd command. Any help would be greatly appreciated.

Posted: Tue Dec 03, 2002 8:57 pm
by oldtimer
Well looking at the examples none work for me.

This example they say works
system("ls -la \"/home/sites/sitexyz/www/$username\" ");
but then I try to modify it to
system("htpasswd -b \"/my/dir/.htpasswd $user $password\" ");

and get nothing. I do not get an error and the file is not updated. I tried
system("htpasswd -b /var/passes/.htpasswd-board $user $password");
as well.

Any ideas?