This is a discussion on Help!!! GPG (GnuPG) & PHP: system Safe Mode workarounds? - PGP ; Hi Folks, I finally got GPG loaded on my FreeBSD server--not the latest version, but it works. It it works fine on the command line. However, I am trying to send an encrypted email using PHP. The problem is that ...
Hi Folks,
I finally got GPG loaded on my FreeBSD server--not the latest version,
but it works. It it works fine on the command line. However,
I am trying to send an encrypted email using PHP.
The problem is that PHP is in "safe mode" on the server, and
won't let me do something like any of these:
$msg = 'Stuff to encrypt"
$GPGdir = '/usr/local/bin/gpg';
$To = 'EmailAddresThatHasAPGPkey@SomeDomain.com';
$cmd = "echo $msg | $GPGdir -a --always-trust -e -r $To";
// This won't work:
$EncryptedMsg = `$cmd`;
// Nor this:
system($cmd, $EncryptedMsg);
// Ditto:
exec($cmd, $EncryptedMsg);
// More of the same:
$EncryptedMsg = shell_exec($cmd);
?>
Surely, some GnuPG gurus know how to get around this
restriction???? I am not the first person to have
this problem, am I?
Aaarrgh! Please help!
--
Start Here to Find It Fast!(TM) ->
http://www.US-Webmasters.com/best-start-page/