(This question was originally posted on ServerFault - I have deleted it there and moved it here.)
I have a development machine running PHP 5.3.5 and a produ
You passed the wrong parameter of openssl_public_encrypt
openssl_public_encrypt
openssl_public_encrypt($data, $encrypted_data, $key1, OPENSSL_PKCS1_PADDING)
where $key1 is the resource id use $key instead of $key1. You can use
$key1
$key
openssl_public_encrypt($data, $encrypted_data, $key, OPENSSL_PKCS1_PADDING)