Jump to content

setup GnuGP


kid85

Recommended Posts

I'm trying to setup GnuGP aka GPG but can't make it work. Where can I find path to gpg ??

 

I got part of this code from:

http://www.ibm.com/developerworks/opensource/library/os-php-encrypt/

 

	//set up users
$from = "myemail";
$to = "myemail";

//$gpg_path = '/usr/bin/gpg';
$gpg_path = '/usr/bin/gpg';
$home_dir = '/home/myusername';

$cmd = "echo $message | HOME=$home_dir $gpg_path" .
	"--quiet --no-secmem-warning --encrypt --sign --armor " .
	"--recipient $to --local-user $from";

$message = `$cmd`;

mail($to,'Message from Web Form', $message,"From: $from\n");

Link to comment
https://forums.phpfreaks.com/topic/84368-setup-gnugp/#findComment-430517
Share on other sites

Where can I find path to gpg ??

 

use the shell command "which"...

 

which gpg

 

It will tell you where in your path the gpg command is located at.  If it returns as not found, then make sure it's installed.  If it's not in a common location (/usr, /usr/local, /usr/sfw, /opt, etc...) then you may have to use the find command (IF you are sure that gpg is installed)

Link to comment
https://forums.phpfreaks.com/topic/84368-setup-gnugp/#findComment-430751
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.