I am working on a script that should run a perl script through the command line (using shell_exec()). To set up the script, I needed to generate a GPG key on my end and import their public key into the GPG firewall.
The Perl script works fine when I run it as a ROOT user, but when I run it through PHP it gives this error message:
"An error occurred while trying to sign the request"
I assume this means that the GPG keys that I installed in my root user are not accessible to the user. PHP executes its shell commands under (i.e. apache).
How do I solve this?
I don’t know if I need to log in as apache and import the keys, or if there is a command to run as root so that they can be accessed by the apache user ... Any ideas would be great :)
source
share