| 
 Posted by r_irwin_rabc on 03/08/07 00:21 
Hi there, 
 
I'm very sorry to have to everyone but I've exhausted all options to 
get this to work. The gpg command is working fine on an apache server 
through the command prompt - I've added a key and successfully 
encrypted. However, I cannot get it working in PHP. The strange thing 
is it did previously work but now I just get "gpg: command not found" 
- I've no idea why this has stopped working. 
 
My path is /usr/local/bin/gpg 
The .gnupg folder contains: 
666 trustdb.gpg 
604 secring.gpg 
604 random_seed 
644 pubring.gpg 
644 options 
 
I'm using the following code (using same command as I would in SSH) 
where the test.txt file contains some example text and user@domain 
would be my email user in the key ring: 
 
$gpg = '/usr/local/bin/gpg'; 
$oldhome = getEnv("HOME"); 
putenv("HOME=$gpg"); 
echo shell_exec("gpg -a --always-trust --batch --no-secmem-warning -e - 
r user@domain.com test.txt"); 
putenv("HOME=$oldhome"); 
 
Has anybody got any suggestions? 
 
Robin.
 
  
Navigation:
[Reply to this message] 
 |