Re: PHP run from console - automatic password input
| From: | shiplu | Date: | Tue, 29 Nov 2011 05:20:07 +0000 |
| Subject: | Re: PHP run from console - automatic password input | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315862@lists.php.net to get a copy of this message | ||
On Tue, Nov 29, 2011 at 8:21 AM, asdf zxcv <jazdatestowa@gmail.com> wrote:
> I'm trying to make my php script (run from console) to input nesesary data
> when console asks for it.
>
> For example, i want to automatically manage revoking self-signed
> certificates, but when i exec("command") then system asks me to give the
> pass phrase. I dont want to do that. Instead, I want my script to input the
> password automatically.
>
> Is there any way to achieve that?
>
> Regards
> Peter
>
You could try,
$pass = "1285@";
exec("echo $pass | command");
But if its a privilege issue on your linux system, its better to start the
php script with proper privilege.
--
Shiplu Mokadd.im
Innovation distinguishes between follower and leader