GPG key import through PHP not working (works in shell)

I have to import a GPG key in a PHP script, it works using the commande line \[code\]gpg --import "/home/me/pubkey.txt"\[/code\]but does not work using the PHP \[code\]gpg\[/code\] class with the \[code\]import\[/code\] method even with the \[code\]gnupg_import\[/code\] function.My configuration is :
  • RedHat Enterprise Linux 5
  • PHP 5.1.6
  • GnuPG 1.4.5
  • GPGme 1.1.8
  • GPG extension 1.3.1
I also tried using the \[code\]exec\[/code\] or \[code\]system\[/code\] functions of PHP, but with no success, with the same command line (\[code\]exec('cat "/home/me/pubkey.txt"')\[/code\] works so the file is readable).Edit: It works on Unbuntu 9.10 Server with GnuPG 1.4.9, PHP 5.2.6.
 
Back
Top