Hi,
I've just spent todays trying to get GPG to run with PHP, it wouldn't execute GPG cause it was using user 'nobody' rather the the user for my shell account. However after talking to my shell company, they tested some stuff, and gave me this, it might or might not work for you, however I thought I'd post it here, in case someone needed it.
When you want to invoke GPG, use: -
system("export HOME=/users/myaccount ; /usr/bin/gpg --encrypt --no-secmem-warning -ao $crypted -r 'MyKey' $plainTxt");
Its the extra "export HOME=/users/myaccount ;" that seems to have solved my problem, it might yours.
Cheers
Ben