Ana sayfa > Bilgi Merkezi > English > cPanel > General > How to install GNUPG PHP Extension
How to install GNUPG PHP Extension
GnuPG is the GNU project’s complete and free implementation of the OpenPGP standard as defined by RFC4880 . GnuPG allows to encrypt and sign your data and communication, features a versatile key management system as well as access modules for all kinds of public key directories. GnuPG, also known as GPG, is a command line tool with features for easy integration with other applications.
Installation process is very straightforward provided you met the requirements like php-pear, gnupg, libgpg-error, and gpgme. You can install it directly from WHM -> Module Installers -> PHP Pecl, enter gnupg and click the Install button.
You can do the same via shell with this command pecl install gnupg.
Then restart your Apache.
Be sure to double check if the extension was added to you php.ini.
cat /usr/local/lib/php.ini | grep gnupg.so
You can download and install it from source.
On Cpanel servers most of the requirements are present, like php-pear (if you compiled your apache/php with pear), gnupg, libgpg-error, etc, except for gpgme which is the main library used by gnupg extension.
You can install gpgme from rpm packages.
Download rpm from mirrors.
gpgme rpm location.
rpm -ivh gpgme-1.1.8-3.el6.x86_64.rpm
If you have any dependancy errors, download it from mirrors and install it.
If you have encountered an error library path when I check the extension,
error while loading shared libraries: libgpgme.so.11: cannot open shared object file: No such file or directory
add /usr/local/lib to /etc/ld.so.conf and run ldconfig, so that libraries in this directory are detected automatically.
Verify gnupg extension with php.
root@server [~]# php -i | grep gnupg gnupg gnupg support => enabled