ldap_modify() is asynchronous. Try using the synchronous version,
ldap_modify_s() which will return you a status code based on the completion
of the operation. ldap_modify() just submits the operation and you need
to subsequently call ldap_result() to obtain the actual results of the
operation.
Craig