Bug #21182 [Com]: Uncaught Crypt_GPG_Exception: Unknown error getting GnuPG version information

From: Date: Mon, 13 Feb 2017 13:22:31 +0000
Subject: Bug #21182 [Com]: Uncaught Crypt_GPG_Exception: Unknown error getting GnuPG version information
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11364@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=21182&edit=1 ID: 21182 Comment by: kyra@existing.me Reported By: kyra at existing dot me Summary: Uncaught Crypt_GPG_Exception: Unknown error getting GnuPG version information Status: Bogus Type: Bug Package: Crypt_GPG Operating System: Linux (Xubuntu) Package Version: 1.6.0b3 PHP Version: Irrelevant Roadmap Versions: New Comment: It says "The user who submitted this bug has not yet confirmed their email address." I was having issues with submitting the form and getting a confirmation email. I know I accidentally opened 21181 and I closed it as a dupe when I found out. If I had erroneously submitted additional ones please invalidate them. From my understanding 21180 will expire in 24hrs anyways, thus making this bug the primary one. I apologize for the confusion. Previous Comments: ------------------------------------------------------------------------ [2017-02-13 02:37:40] alec #21180. ------------------------------------------------------------------------ [2017-02-12 14:25:52] kyrad > Because of this, we hope you add your comments to the existing bug instead. It would be nice to be told what bug # it is. There are only 2 open bugs listed here: https://pear.php.net/bugs/search.php?cmd=display&package_name[]=Crypt_GPG&status=Open Neither of them describe what I am experiencing. =o\ ------------------------------------------------------------------------ [2017-02-12 07:56:59] alec -Status: Open +Status: Bogus Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the existing bug instead. Thank you for your interest in PEAR. Duplicate. ------------------------------------------------------------------------ [2017-02-12 04:30:19] kyrad Description: ------------ Crypt_GPG fails to run multiple methods with the same error about getting version information. I've tried getting fingerprint, exporting public key, and adding encryption key. All fail with the same error. I've even tried using dev-master branch and still the same issue. I have ALL extensions compiled as shared, so I load them individually. The backtrace will show which ones are loaded. php: 7.1.2 gpg: 2.1.11 gpg-agent: 2.1.11 libgcrypt: 1.6.5 Test script: --------------- <?php declare(strict_types = 1); $cryptGpg = new Crypt_GPG([ 'agent' => '/usr/bin/gpg-agent', 'binary' => '/usr/bin/gpg2', 'debug' => true, 'homedir' => '/home/username/.gnupg' ]); echo $cryptGpg->getFingerprint('security@example.com'); Expected result: ---------------- No error, and the key fingerprint to be outputted. Actual result: -------------- /bin/php -c /etc/php/php.ini -dextension=mbstring.so -dextension=posix.so -dextension=hash.so -dzend_extension=xdebug.so -dextension=iconv.so -dextension=json.so -dextension=pdo.so -dextension=pdo_mysql.so -dextension=openssl.so ./bin/myapp Crypt_GPG DEBUG: OPENING GPG SUBPROCESS WITH THE FOLLOWING COMMAND: Crypt_GPG DEBUG: /usr/bin/gpg2 --status-fd '3' --command-fd '4' --no-secmem-warning --no-tty --no-default-keyring --no-options --always-trust --ignore-time-conflict --ignore-valid-from --homedir '/home/username/.gnupg' --version Crypt_GPG DEBUG: BEGIN PROCESSING Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 3 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 65536 bytes from GPG output Crypt_GPG DEBUG: => read 584 bytes Crypt_GPG DEBUG: GPG error stream ready for reading Crypt_GPG DEBUG: => about to read 65536 bytes from GPG error Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: GPG status stream ready for reading Crypt_GPG DEBUG: => about to read 65536 bytes from GPG status Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: selecting streams Crypt_GPG DEBUG: => got 1 Crypt_GPG DEBUG: GPG output stream ready for reading Crypt_GPG DEBUG: => about to read 65536 bytes from GPG output Crypt_GPG DEBUG: => read 0 bytes Crypt_GPG DEBUG: END PROCESSING Crypt_GPG DEBUG: CLOSING GPG SUBPROCESS Crypt_GPG DEBUG: => subprocess returned an unexpected exit code: -1 PHP Fatal error: Uncaught Crypt_GPG_Exception: Unknown error getting GnuPG version information. Please use the 'debug' option when creating the Crypt_GPG object, and file a bug report at http://pear.php.net/bugs/report.php?package=Crypt_GPG in ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php on line 1782 #0 ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php(1782): Crypt_GPG_ProcessHandler->throwException(-1) #1 ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php(837): Crypt_GPG_Engine->_closeSubprocess() #2 ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php(988): Crypt_GPG_Engine->run() #3 ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php(1504): Crypt_GPG_Engine->getVersion() #4 ./vendor/pear/crypt_gpg/Crypt/GPG/Engine.php(835): Crypt_GPG_Engine->_openSubprocess() #5 ./vendor/pear/crypt_gpg/Crypt/GPG.php(597): Crypt_GPG_Engine->run() #6 ./src/bootstrap/bootstrap.php(24): Crypt_GPG->getFingerprint('security@exampl....') ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=21182&edit=1

« previous php.pear.bugs (#11364) next »