I am trying to decrypt a simple message with PGP(gnupg) in PHP.
But I always get this error: get_key failed
.
On stack-overflow I see many people with this probl
The code in the thread is fine, but have in mind your nginx user is different than user
and nginx will have issues accessing its gnupg keys because (by default) /home/user/.gnupg
is only OWNER (user
login) accessible.
Easiest thing would be to set home directory for the nginx user and create its own gnupg keys for this purpose. Otherwise running this php will only succeed when you are logged in into terminal using the user
login (because /home/user/.gnupg)