I written a simple php script (see below) to delete GnupG 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 ?
Thank you
Code: Select all
<?
function getDELETEPRIVATE()
{
ob_start();
$command = "/usr/bin/gpg --no-secmem-warning --home /home/test/.gnupg --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>";
?>