OpenSSL needs to be enabled for using SSL in PHP.
In order to check it, you can write a small PHP script and run it at the terminal and grep for word OpenSSL
Save this script into a file, say the file is named as modules.php
Now run the script and grep for the word OpenSSL as follows:
admin@livrona:~$ php modules.php | grep OpenSSL
SSL Version => OpenSSL/1.0.1
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1 14 Mar 2012
OpenSSL Header Version => OpenSSL 1.0.1 14 Mar 2012
Native OpenSSL support => enabled
If you see the output like above, where it says OpenSSL support => enabled then its all set or it is not enabled/installed.
Likewise you can also check if SSL support is enabled in Apache or not. In order to do so, check whether the SSL module is loaded or a symlinks to SSL module files (conf and load) are present in the Apache's mods-enabled folder. If its not there, enable it by creating the following two symlinks:
root@livrona:/etc/apache2/mods-enabled# ln -s ../mods-available/ssl.conf ssl.conf
root@livrona:/etc/apache2/mods-enabled# ln -s ../mods-available/ssl.load ssl.load
Once enabled in Apache, restart the Apache Server for it to take effect.