system()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

system()

Post 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.
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Post 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?
Post Reply