July 22nd, 2001, 11:13 AM
I'm trying to run gpg from my php script using exec and I keep getting error 2 all the time. If I just run gpg --help for test purposes, it runs fine without errors. Here's what I'm doing
$oldhome = getEnv("HOME");
$command = "'Hello' | /usr/local/bin/gpg -a -u 'secret' --recipient 'public' --no-secmem-warning --encrypt";// it's just a test so it mightn's really make sense, i get the same error if i try to encrypt a file without using pipes
exec($command, $res, $err);
$err echoes as 2
Does anybody have any suggestions?