[PHP-DEV] PHP 4.0 Bug #7168 Updated: Unable to delete "facsimileTelephoneNumber" attribute From: venaas <email protected>
Date: 11/14/00

ID: 7168
Updated by: venaas
Reported By: espot <email protected>
Status: Closed
Bug Type: LDAP related
Assigned To: venaas
Comments:

The reason is that OpenLDAP as per RFC 2252 doesn't have equality
matching for facsimileTelephoneNumber. Why they didn't define the
matching similar to telephoneNumber is beyond me. You can fix it by
changing the schema I guess. You might want to ask about this on the
OpenLDAP lists.

Previous Comments:
---------------------------------------------------------------------------

[2000-11-08 09:43:00] espot <email protected>
After adding:

echo ldap_error($ds);

after both ldap_add() and ldap_mod_del() the new output is:

Success
Warning: LDAP: modify operation could not be completed. in /home/httpd/html/skolekatalogen/crash.php on line 19
Success

---------------------------------------------------------------------------

[2000-11-08 00:25:09] sniper <email protected>
Try adding this after both ldap_add() and ldap_mod_del() functions:

echo ldap_error($ds);

--Jani

---------------------------------------------------------------------------

[2000-11-05 10:47:35] espot <email protected>
The following script also fails:

<?php
$ds=ldap_connect("localhost"); // assuming the LDAP server is on this host

if ($ds) {
  // bind with appropriate dn to give update access
  $r=ldap_bind($ds,"cn=root, o=LS, c=NO", "secret");
  
  // prepare data
  $info["cn"]="John Jones";
  $info["sn"]="Jones";
  $info["facsimileTelephoneNumber"] = "555-55555";
  $info["mail"]="jonj <email protected>";
  $info["objectclass"]="inetOrgPerson";
  
  $r=ldap_add($ds, "cn=John Jones, o=LS, c=NO", $info);

  $delInfo["facsimileTelephoneNumber"] = "555-55555";
  ldap_mod_del($ds, "cn=John Jones, o=LS, c=NO", $delInfo);

  ldap_close($ds);
} else {
  echo "Unable to connect to LDAP server";
}?>

---------------------------------------------------------------------------

[2000-11-04 01:51:15] sniper <email protected>
There is no bug.
If you first delete the attribute with ldap_modify() of course
the ldap_mod_del() fails.

--Jani

---------------------------------------------------------------------------

[2000-10-12 17:13:33] espot <email protected>
in line 21 modInfo should be replaced by delInfo.
The problem remains the same.

---------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online.

Full Bug description available at: http://bugs.php.net/?id=7168

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>