If you are still having trouble after following all the instructions on the Web to get LDAPS to work, here's what worked for me:
I was trying to do LDAPS connection (our LDAP server was using port 40636) by running following command:
ldap_connect("www.example.com",40636)
This didn't work for days till I changed it to the following format:
ldap_connect("ldaps://www.example.com:40636")
Hope it'll help some out there.
-Cagdas