openssl_private_decrypt _sometimes_ doesn't decrypt correctly
===

I'm facing this issue while testing public/private encryption with PHP and OpenSSL.
On the server I have this really simple php code:

    $privateKey = openssl_pkey_get_private('file://privateKeyPath', $myAwesomePassphrase);

    openssl_private_decrypt($_REQUEST['secret'], $cleanText, $privateKey);

    echo json_encode(array('clean' => $cleanText));

 
so Just try yourself with this public key

    -----BEGIN PUBLIC KEY-----
    MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnO45p1PiZzXKho+4BWp8rRPd+
    0b5JEp7x1XRM6uLfFeT1F4ENtfeb16Ly2UG4s4yds1F7/0B5xYNx6fZLhUE4C3L2
    /zkRdNT0UqhEb42HnVY+xQHcLl0ZMVMY0MwjDqp4kS/HA6caolYBCmwdn16QdpNj
    irf2auF8IS64a2LcywIDAQAB
    -----END PUBLIC KEY-----

you just need to make a post request at this URL: http://www.leorossi.it/test/decrypt.php

You will see that sometimes the string returned is null, sometimes is actually the decrypted string.
Since this services should be reliable, I can't afford to have nearly 50% of response null-ed.

Does someone have some advice for me?

Thanks!