php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12231 about ldap_get_values_len
Submitted: 2001-07-18 09:53 UTC Modified: 2001-12-05 07:04 UTC
From: stsit at szonline dot net Assigned:
Status: Closed Package: LDAP related
PHP Version: 4.0.6 OS: redhat7.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stsit at szonline dot net
New email:
PHP Version: OS:

 

 [2001-07-18 09:53 UTC] stsit at szonline dot net
I have a binary data in LDAP,(the data is 570k)
when i use $data=ldap_get_values_len() to get the data,
i found that $data[0] has 33k,i think because it have "00" in the binary data.
how can i do?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-12 09:19 UTC] venaas@php.net
This is precisely why ldap_get_values_len() exists. I
use the following code to extract pictures:

ds=ldap_connect($host);
$r=ldap_bind($ds);
$sr=ldap_read($ds, $dn, "objectClass=*", array("jpegphoto"));
if ($sr) {
    $ei=ldap_first_entry($ds, $sr);
    if ($ei) {
        $info = ldap_get_values_len($ds, $ei, "jpegphoto");
        header("Content-type: image/jpeg");
    }
    echo $info[0];
}
ldap_unbind($ds);

If this doesn't work, show me your exact script and if
possible give me host, port and dn for your server so I
can try. If you want to try against my server, try for
instance ldap.uninett.no with the DN
cn=Anders Lund,o=DUNINETT,dc=Duninett,dc=no

 [2001-12-05 07:04 UTC] sander@php.net
No feedback. Closing.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 13:01:29 2024 UTC