PHP - CentOS - Apache
I am trying to allow users to encrypt/decrypt files on my site. I've settled on gpg as the way I'm going to encrypt/decrypt. The problem is that I need to run a shell_exec with the encryption command and it doesn't seem to run when called from the browser. I have tried everything I can think of including giving all the folders and files involved 777 permmission, which feels wrong.
I think I can accomplish this by setting up a cronjob and a queue, but I was hoping someone knows a better solution.
These are the commands that won't run..
gpg --yes --passphrase=[Enter your passphrase here] -c filename.txt
gpg --yes --passphrase=[Enter your passphrase here] filename.txt.gpg
EDIT: I echoed out the command I was sending to shell_exec and it runs fine from the command line. However it will not run from the browser.
try full path of gpg like /usr/bin/gpg --yes --passphrase=[Enter your passphrase here] -c absolute_path_to_file
in shell_exec