Hi there
I'm having huge difficulties (and I suppose some mental exercise!) with GnuPG and PHP.
As for the problem of listing keys etc, I've got that cracked. The text area works well, but I stumbled across the <pre> tag. Simply echo these tags around your request, and the text is nicely formated:
echo("<pre>");
$comm=system("/usr/local/bin/gpg --list-keys");
echo("</pre>");
I've got gpg importing keys, listing keys, displaying its help file... everything EXCEPT encrypting!
Two possible solutions I've seen are:
1) setting user id of the .gnupg directory (the one with your keys and options in) to nobody. This is apparently due to the fact that apache runs as 'nobody', whereas the .gnupg directory group is 'user'. By changing the group to 'nobody, it apparently works.
2)Using suExec. This involves running php as a cgi, and allows a 'wrapper' which will allow www users to have access to certain user directories. I'm not so keen on this one, though.
As it's 2 am in the morning, I can't get my host to fiddle with the server right now.
But has anyone any ideas? Have they managed to get it to work with encryption, if so, HOW?!!
Best regards
Paul