Re: using stdin in php
| From: | Miguel Cruz | Date: | Thu, 30 May 2002 03:03:00 +0000 |
| Subject: | Re: using stdin in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99840@lists.php.net to get a copy of this message | ||
On Wed, 29 May 2002 rdkurth@starband.net wrote:
> Could somebody look at this a tell me way it does not set the
> password correctly. I know it has to run at root this has been
> handled.
> I think my problem is with --stdin. It sets a password but it does not
> set it correctly
>
> $cmd = "echo $newpassword | passwd --stdin $user";
> return(exec($cmd));
In order to feed to stdin on another process, I think you need to use
this:
http://php.net/popen
miguel