Help! Gnupg can't run in php program

Haibo Liu lhb at array-it.com
Mon Aug 28 03:07:53 CEST 2006


Hello,

Does anybody use GnuPG in PHP program?
The server is on Debian OP.

I create my key pair in the ./gnupg directory.
And the command "gpg --help" runs as normal.
But the command "gpg --list-keys" failed.

What's the problem?

My code is below:

<?php

$val_return = -1;

$cmd = "gpg --help";
system($cmd, $val_return);

echo "<br>";
echo "cmd: $cmd, return code: $val_return<br>";

$cmd = "gpg --homedir ./gnupg --list-keys";
system($cmd, $val_return);

echo "<br>";
echo "cmd: $cmd, return code: $val_return<br>";

?>

lhb



More information about the Gnupg-users mailing list