Encryption setup error: Key generation failed: GPG returned result code 127

Question:

Q: When I configure credit card encryption, I receive the following error:

Key generation failed: GPG returned result code 127: sh: /bin/gpg: No such file or directory

What does this mean, and how do I fix it?

Answer:

This message indicates that open_basedir restrictions are enabled on your server. You'll need to disable open_basedir restrictions in your php.ini file so that iPanel can access GnuPG.