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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Wed Nov 27 06:01:27 2024 UTC