You will need to use the --with-ldap[ =DIR] configuration option when compiling PHP to enable LDAP support.
Retrieve information for all entries where the surname starts with "S" from a directory server, displaying an extract with name and email address.