Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.6.9

Bug #21181 Uncaught Crypt_GPG_Exception: Unknown error getting GnuPG version information
Submitted: 2017-02-12 09:19 UTC
From: kyrad Assigned:
Status: Duplicate Package: Crypt_GPG (version 1.6.0b3)
PHP Version: Irrelevant OS: Linux (Xubuntu)
Roadmaps: 1.6.0    
Subscription  


 [2017-02-12 09:19 UTC] kyrad (Kyra Dev)
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....')

Comments

 [2017-02-12 09:52 UTC] kyrad (Kyra Dev)
-Status: Open +Status: Duplicate