Decryption problems using php

Amol Patil amolp at custom-soft.com
Tue Jun 5 06:50:24 CEST 2012


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 *

amolp at custom-soft.com <mailto:amolk at custom-soft.com> | 
www.custom-soft.com <http://www.custom-soft.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120605/67767574/attachment.htm>


More information about the Gnupg-users mailing list