PDA

View Full Version : GnuPG & PHP problem


pixelhed
01-21-2002, 08:46 AM
I have a PHP related problem

The problem is:
I am using php to activate GnuPG to encode an email message that is generated from user input.

When i issuse the command:
system("/usr/bin/gpg --encrypt -ao $crypted -r $publicKey $plainTxt");

i get an error saying:
Warning: fopen("/home/kinetec/public_html/test/10af1b69474fccf44519acd09f2a31e2gnupgdata","r") - No such file or directory in /home/kinetec/public_html/test/do_sendsecret.php on line 33

This line (33) is directly after the line that tries to execute the GnuPG program. It attempts to read the encoded by GnuPG into a variable. As the file does not exist, the system command is not working (because it creates it).

I have chmod'd the dir to 777. But this didn't help. The script (prior to the line above) manages to create a file on the filesystem so i know that i can write files. It is (i think) that PHP runs as 'nobody' which doesn't have permission to execute the command.

Does anyone have any suggestions?