|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-02 09:48 UTC] legare at uqtr dot ca
[2012-02-21 18:27 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2012-02-21 18:27 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 18:00:01 2025 UTC |
Description: ------------ I've configured/compiled and installed gnupg 1.4.9, gpgme 1.1.4, libassuan 1.0.4, libgcrypt 1.4.1, libgpg-error 1.6, libksba 1.0.3 and pth 2.0.7. I'm using a bundled RPM of PHP 4.3.2 on a 32 bits linux box. I've phpized and compiled successfully other php modules in the past. I then downloaded gnupg (pecl) 1.3.1, phpize and compiled this way : export CFLAGS=-I/p/gnupg/include export LDFLAGS=-L/p/gnupg/lib ./configure --with-gnupg=/p/gnupg/include make copied and chmod the gnupg.so file in my /usr/lib/php4, edited php.ini... restarted apache... phpinfo() shows gnupgme and gnupg versions as expected. My php script displays the following error message : Warning: gnupg_import(): import failed in /web/gemoms/gpg.php on line 39 The key was exported with "gpg --export --armor USER" command. Is there a way to have more debugging output to learn what failed into the import process ? I'm a little puzzled as to know what's failing. Reproduce code: --------------- <? $keydata =<<<EOF -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.9 (GNU/Linux) [skipped] -----END PGP PUBLIC KEY BLOCK----- EOF; error_reporting(E_ALL); if(! $gpg = gnupg_init()) echo "error gnupg_init()"; gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING); if(!gnupg_setarmor($gpg, true)) print gnupg_geterror($gpg); if(! $info = gnupg_import($gpg, $keydata)) print gnupg_geterror($gpg); else var_dump($info); ?>