Ive been wrestling this problem for days now and its causing serious issues with out vendor who relys on this to work...
situation:
cron runs a php script daily that generates .XLS files, encrypts one of them using gpg, zips them all up and then emails the zip
problem:
when run from cron the script does everything except the gpg encryption
more info:
when run manually the script does the gpg encryption so i know the command is properly formed in the script
help!! my guess is this is something related to cron and the user it runs as and gpg but its my understanding that cron runs as the user that the crontab is setup for which is the same user gpg is working for and the same user that can manually run the script without issues.
any ideas? suggestions? comments? questions?
I have tried the following:
adding full paths to everything in the script - still no go
creating script with nothing in it except the gpg command - still no go
this is the command it is NOT executing via cron from the script:
script.php:
exec("echo 'password' | /usr/bin/gpg -a --output foo.gpg --symmetric --passphrase-fd 0 foo.xls");
TIA