Hello all,

This has been covered before, but I can't get it to work and I've searched 
all the archives already.

I am trying to encrypt a small string of data. I am using a script by 
Richard Lynch as my starting point. I found it here:
http://www.weberdev.com/get_example.php3?count=1379

Now, I am on MacOSX trying to get this thing to work. I installed an OSX 
version of gnupg 1.04, without any problems, and created to sets of keys. 
My idea is to get this to work on my local machine first, then eventually 
get it to work on my web hosting account.

Here is the code I am using:

>       putenv("HOME=/Users/sohara/");
>       
> // Explanation follows...
> $command = "echo '$data' | /usr/local/bin/gpg -a --batch 
> --no-secmem-warning -e -u '[EMAIL PROTECTED]' -r 'alien8@alien8recordings.
> com'" ;
>       
>       // Actually execute the command
>       $result = exec($command, $encrypted, $errorcode);
>
>       if ($errorcode)
>               {
>               echo "Error $errorcode encrypting your data.<br>\n";
>               exit;
>               }
>
>       $encrypteddata = implode("\n", $encrypted);
        echo "This is the encrypted data:<br> $encrypted \n";

And this always gives returns an error number 2. I can't find a list of 
error numbers at gnupg, so the error number isn't very helpful so far. 
Does anyone know about the gnupg error numbers, or just using gnupg with 
php?

Thanks,
Sean

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to