|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-02-22 09:33 UTC] t dot tayyem at yahoo dot com
Description: ------------ I've faced the error Warning: gnupg_import(): import failed " while importing the public key and I did not have any luck solving this issue , when use (iis server-win8 - php version 5.5.12) with (php-5.5-windows-extensions/php_gnupg-1.3.3-5.5-vc11-x86/). The question is, can i use php_gnupg (PGP (Pretty Good Privacy)) with IIS server to encrypted file ? php_gnupg is a compatible with iis server !!!! NOTE: This problem does not appear when use XAMPP sever. http://php.net/manual/en/book.gnupg.php https://github.com/maryo/php-5.5-windows-extensions/tree/master/php_gnupg-1.3.3-5.5-vc11-x86 Test script: --------------- $res = gnupg_init(); $public_key_sender = file_get_contents('public_key_sender.asc', true); $private_key_sender = file_get_contents('public_key_sender.asc', true); $private_key_sender_ = gnupg_import($res,$private_key_sender); $public_key_sender_ = gnupg_import($res,$public_key_sender); Expected result: ---------------- when use iis server (php version 5.5.12) ( ! ) Warning: gnupg_import(): import failed in C:\inetpub\wwwroot\index.php on line 18 Actual result: -------------- when use xampp server (php version 5.5.12) Array ( [imported] => 0 [unchanged] => 1 [newuserids] => 0 [newsubkeys] => 0 [secretimported] => 0 [secretunchanged] => 0 [newsignatures] => 0 [skippedkeys] => 0 [fingerprint] => 94E803482C486876AEFB6A3B4EACA1AE3C37066D ) Patchesgnupg-iis (last revision 2016-02-22 09:41 UTC by t dot tayyem at yahoo dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 23:00:01 2025 UTC |
Please don't file non-security related tickets for PHP versions which are no more actively supported[1] - PHP 5.5 is not actively supported anymore as of July 2015. So please try again with an actively supported PHP version, and make sure that you have error_reporting set to E_ALL and to post *all* notices/warnings etc. thrown by PHP. Furthermore please post a self-contained reproduce script, if possible. And, of course, make sure, that you don't read the contents of the same file for the public and the private key: > $public_key_sender = file_get_contents('public_key_sender.asc', true); > $private_key_sender = file_get_contents('public_key_sender.asc', true); [1] <http://php.net/supported-versions.php>