<?php
$gpg = new gnupg();
$gpg -> seterrormode(gnupg::ERROR_EXCEPTION);
$gpg -> adddecryptkey("8660281B6051D071D94B5B230549F9DC851566DC", "test");
$gpg -> addencryptkey("8660281B6051D071D94B5B230549F9DC851566DC");
$gpg -> addsignkey("8660281B6051D071D94B5B230549F9DC851566DC", "test");
$info = $gpg -> keyinfo("test");
var_dump($info);
[11-Sep-2020 15:56:43 Europe/Kiev] PHP Fatal error: Uncaught Exception: get_key failed in /home/tsecret1/Test-Server/GnuPG/index.php:4
Stack trace:
#0 /home/tsecret1/Test-Server/GnuPG/index.php(4): gnupg->adddecryptkey('8660281B6051D07...', 'test')
#1 {main}
thrown in /home/tsecret1/Test-Server/GnuPG/index.php on line 4