I recently had to access a Microsoft Active Directory server as an LDAP service over SSL using PHP. It took me a long time to get all the information I needed to get it to work.
I attempted to post a note here with the details but it ended it being too long. I've placed the details at the following URL in hopes that someone else will benefit and will be able to solve the problem much more quickly than I did.
http://greg.cathell.net/php_ldap_ssl.html
Good luck!