please forgive lack of tags - not sure how as yet.
I have a linux mint lisa desktop with an apache2 server installed, php 5.3.6 and the Gnupg wrapper installed (GPGME version 1.2.0, Extension Version 1.3.2-dev)
I have an php script which will decrypt a passed file name automatically. With the script these are the pertinent lines of code.
$GnuPG = new gnupg();
$GnuPG -> adddecryptkey("fingerprint","passphrase");
$text = file_get_contents($path1.$file);
$plain = $GnuPG -> decrypt($text);
This works without an issue, the encrypted file is grabbed and its contents decrypted, the rest of the script doing what it needs to do.
Now I have since created an ubuntu 12.04 server version of the above, with apache2, php 5.3.10 and the same versions of GNUGP wrapper installed. The same process was used for installing the wrapper on both machines, the pertinent code is the same but I get nothing.
In an attempt to debug, I have written about the $path1.$file and $text variables to a log file and they are as I would expect. I have tried to write out the $plain information as well but nothing is returned.
Does anyone have any ideas either about the problem itself or where I may find more information to debug it?
I know its not the fingerprint of gpg itself because if I drop to cli and manually decrypt there isnt an issue. I have managed to get some more information through trial and error
PHP Warning: gnupg::adddecryptkey(): get_key failed in /var/www/decrypt.php
which appears quite obvious but I have no idea how to resolve it. As I say this works fine on the desktop server, rather than server server.
Any help gratefully received
thanks!!