i used ldap_initialize and tried initializing the connection using the CA certificate. i still am getting the same error.
Right, because ldap_start_tls_s() performs the LDAP start TLS operation, but for ldaps the client is supposed to simply negotiate TLS/SSL upon connection, without sending an LDAP operation first.
Philip Guenther