Hello,

Currenlty I am having problem with the decryption of the file my code is like this

echo shell_exec("echo $passphrase | $gpg --passphrase-fd 0 -o $unencrypted_file -d $encrypted_file");

when I checked using echo beforer executing it will shown as below

passphrase|gpg --output /var/www/directory/directory/directory/Receive/BOEOD840053012142257187.xml --passphrase-fd 0 --decrypt /var/www/directory/directory/directory/Receive/BOEOD840053012142257187.pgp

above command is executed correctly using putty but when I tried to use this command using php it is not working.
I have set permission to the directory . But it seems it not working

$gpg = '/usr/bin/gpg';
 $passphrase = 'passphrase';
 //$encrypted_file = 'foo.gpg';
  //$unencrypted_file = 'foo.txt';
echo shell_exec("echo $passphrase | $gpg --passphrase-fd 0 $unencrypted_file -d $encrypted_file");


Please assist me to work it correctly. I am facing such problems last 2 weeks. We are using ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic i686).


--

*Thanks & regards,*

**

*Amol Patil *

*Custom**Soft*

*+ 91 -- 020 - 3251 7794 *

[email protected] <mailto:[email protected]> | www.custom-soft.com <http://www.custom-soft.com/>

_______________________________________________
Gnupg-users mailing list
[email protected]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to