In PHP 5.3, I'm using exec() to run this command:
echo "Text that will be encrypted" | gpg -a --yes --always-trust --batch --no-secmem-warning -e -u "Me <me@test.com>" -r "Client <client@abc.com>"
It seems to work fine at the Command line & encrypts the text.
The PGP configuration files are under: /root/.gnupg "root" is the User
# chmod 700 /root/.gnupg
# chown -R root:root /root/.gnupg
# cd /root/.gnupg
# chmod 600 *
When I run it within PHP (apache User), it produces an Error 2 ?
What am I missing ?
Thanks, in advance, for your help.