Works from the command line, but I can't get it to work with PHP

Adam Cadieux acadieux@pcguardian.com
Tue Aug 19 20:10:03 2003


I am trying to write a PHP script that will encrypt user data (4 numbers)
with a symmetric password, but I am having trouble.

I have looked through the archives and have added:
putenv("/home/encrypt/.gnupg");

Also I have made sure that I have make all the files in .gnupg are readable

I can get this command to work:
echo system("gpg --warranty --homedir /home/encrypt/.gnupg");

But when I run this test line nothing happens:

echo system("echo 1234 | /usr/bin/gpg -o file.gpg --symmetric --homedir
/home/encrypt/.gnupg", $password);

I also can't seem to get this type of command to work either.

echo system("gpg --list-keys --homedir /home/encrypt/.gnupg");

Thanks for any suggestions.

Cheers,

Adam