gpg: cannot open /dev/tty
Graziano
graziano@ecosse.net
Sat Dec 14 10:07:01 2002
Hello
I written a php script to delete secret keys , however I receive this error ;
>gpg: cannot open /dev/tty
If I add --no-tty I receive this error ,
>gpg: Sorry, no terminal at all requested - can't get input
Any idea ?
Below there is the php script (the command executed is on $command) .
Thank you
Graziano Meneguzzo
Rome ,Italy
<?
function getDELETEPRIVATE()
{
ob_start();
$command = "/usr/bin/gpg --no-secmem-warning --home /home/test/.gnupg --yes
--yes --delete-secret-key 'B209E218'";
passthru($command);
echo"<pre>";
$lookup = ob_get_contents();
ob_end_clean();
return $lookup;
}
$delete = getDELETEPRIVATE();
echo "=========================================</BR>";
echo "<pre>$delete</pre>";
?>