Hi Peter,
It's puzzling that pgp will execute from the command line but not from the exec() or system() calls (perhaps try system instead of exec if you're not already using it; that should show any errors).
Perhaps it's a permissions kind of thing. I've always struggled trying to understand permissions.
Here's a long shot:
Can you execute a php script from another php script? For example
test1.php
<?php
system("/path/to/php /path/to/test2.php");
?
test2.php
<?php
echo 'php and pgp is driving me crazy';
?>
It works for me. Don't know why it wouldn't work for you. But then I don't really know why your command line pgp works by your call from php doesn't.
As for the Perl: No, I don't know one that has integrated the two (but there's probably lots on phpbuilder about it). It should be just another system call, but I don't know how you would pass variables to it (through a file, perhaps?).
For what it's worth, the site I use pgp on uses Perl for parsing the form. I found Perl cumbersome at grabbing form data, but then I don't really know what I'm doing with Perl.
As for installing a public key on the server: I don't really understand what you want to do (that's probably my shortcoming, not your's). I created my public keys on my local windows machine and then uploaded them. Is that what you mean?
Fun stuff, eh?
Rob