Re: PHP run from console - automatic password input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 29, 2011 at 8:21 AM, asdf zxcv <jazdatestowa@xxxxxxxxx> 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

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux