PGP --> PHP
| From: | J.Mueller, pro.vider.de GmbH | Date: | Sat, 22 Dec 2001 15:00:54 +0000 |
| Subject: | PGP --> PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-78567@lists.php.net to get a copy of this message | ||
Hello Everybody,
we have a problem to implement a PGP-function into
a PHP-Script. PHP 4.0.6 as CGI, Apache 1.3.11, FeeBSD 4.2
a)
PGP from the command line works:
% pgps -ato test.sig test.txt -z passphrase
b)
Calling a little PHP Script
$kommando = "/usr/local/bin/pgps -ato test.sig test.txt -z passphrase";
exec("$kommando",$antwort);
to do so, also everything works fine:
% virtual /usr/local/bin/php /etc/test-pgp.php
Creating output file test.sig
X-Powered-By: PHP/4.0.6
Content-type: text/html
c)
But when we use this very same PHP-code within a script, and call this
script through the web, it's not working anymore and the error_log
says
Cannot open configuration file pgp.cfg
Cannot open secret keyring "secring.skr"
Cannot open public keyring "pubring.pkr"
Why is that and can this problem be solved ?
Thank you very much.
Juergen