raven74 Posted January 5, 2008 Share Posted January 5, 2008 I can't get GnuPG / GPG to work on my shared server: - gpg is installed on the server - no functions are disabled in php.ini Anyway, I checked and exec works. - .htaccess allows ExecCGI (just in case this has anything to do with the problem) - gpg and home path are correct according to: $_SERVER['DOCUMENT_ROOT']; and exec("which gpg"); - in gnupg folder: pubring.gpg, random_seed, secring.gpg, trustdb.gpg are all cmod 644. I run the code but absolutely nothing is outputted not even errors... nothing... not even when setting error reporting to "eall". I have tried all the php tutorials I could find on the net but they all have the same problem: they don't output anything. I created a "4096" bit?byte? public key with a key password. Does this password have to be included somewhere in the code ? <?php $gpg = '/usr/bin/gpg'; $recipient = '[email protected]'; $texttoencrypt = 'Sample text to encrypt.'; $key_dir = '/home/myusername/.gnupg'; $shellreturn = shell_exec("$gpg -e --homedir $key_dir --no-secmem-warning -r $recipient $texttoencrypt"); echo $shellreturn; ?> Link to comment https://forums.phpfreaks.com/topic/84661-gnupg-gpg-not-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.