为什么openssl_get_publickey返回NULL?

I am writing the authorization process for a program that's built on top of open social. The library that I am using is Oauth library. The certificate has been tested on other machines where it worked perfectly, though the exact same certificate does not work in my computer.

After I trace the error, the problem comes from this function: (inside oauth.php line:207)

$publickeyid = openssl_get_publickey($cert);

note : $cert is RSA Certificate

This function returns NULL on my computer, while it actually works (return valid value) when tested from the other computer. How can I fix this?

Does this have something to do with my Apache or local machine configuration? My php.ini and httpd.conf seem to be the same as the other machine also. I have been working on this things for several hours, and can't find any related solution in the Internet as well.