Hi,
I'm trying to create a file using gpg, I'm doing
$plainTxt = ("$DOCUMENT_ROOT" . "$tmpToken" . "data");
$crypted = ("$DOCUMENT_ROOT" . "$tmpToken" . "gpgdata");
$fp = fopen($plainTxt, "w+");
fputs($fp, $message);
fclose($fp);
system("/usr/bin/gpg --encrypt -ao $crypted -r 'HotKey' $plainTxt");
$fd = fopen($crypted, "r");
$mail_cont = fread($fd, filesize($crypted));
fclose($fd);
However i get an error when I run it, saying: -
Warning: fopen("93e859f5d29407de96c930187e24742cgpgdata","r") - No such file or directory
Warning: Supplied argument is not a valid File-Handle resource
What am I doing wrong? I know the system is running gpg ok, but for some reason, the file for $crypted isn't being created!
Can anyone see why?
Cheers
Ben