Shilohcity
Technical User
Hi there
I am trying to encrypt and send some information from a php page as an email. I know this can be done using gpg but I am not having much luck getting it to work. I have setup a key for myself on the webserver and am trying to use the following code:
<?php
$gpg = '/usr/bin/gpg';
$recipient = '1024D/5F38D79B 2002-10-31 Justin Hewitt (Justins Key) <justin@dfodesign.co.nz>';
$secret_file = 'test_table.txt';
echo shell_exec("$gpg -e -r $recipient $secret_file"
?>
to encrypt a file. Nothing is happening though. No errors but no encypted file either.
Does anybody have any advice or links to an explanation of how this process should work.
As always all thoughts, comments and suggestions are gratefully received.
Justin. X-) "Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer
Visit me at
I am trying to encrypt and send some information from a php page as an email. I know this can be done using gpg but I am not having much luck getting it to work. I have setup a key for myself on the webserver and am trying to use the following code:
<?php
$gpg = '/usr/bin/gpg';
$recipient = '1024D/5F38D79B 2002-10-31 Justin Hewitt (Justins Key) <justin@dfodesign.co.nz>';
$secret_file = 'test_table.txt';
echo shell_exec("$gpg -e -r $recipient $secret_file"
?>
to encrypt a file. Nothing is happening though. No errors but no encypted file either.
Does anybody have any advice or links to an explanation of how this process should work.
As always all thoughts, comments and suggestions are gratefully received.
Justin. X-) "Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer
Visit me at