Can't read public key

I have downloaded and installed the plug-in for out and generated a key pair.

I have uploaded the public key to my Unix server and have run gpg --list-keys from a php script.

The key seems to be present. However when I attempt to encrypt a file I get an error code 2. It is as if it’s not there.

Any thoughts gratefully accepted.

Thanks John