Simon,

I've seen thumbnailPhoto attribute in LDAP, but I have never seen this
reference anywhere in the Active Directory. How do you store image in
the Active Directory? In other words where do you upload the image?

Thanks
Igor P.

-----Original Message-----
From: Simon Taylor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 5:07 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Extracting images from active directory using php

Thanks Stephen,
yep I have already made sure connection etc is good, the main problem
here
is getting binary data out of the ldap directory - I was hoping someone
around has had experience with this, but I will have to scratch my head
some
more.
Cheers
Simon

"Stephen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm not familar with how LDAP works, so my comments are more general
coding
> type ones.
>
> I suggest first checking your connection for error messages by
removing
this
> bit
> > echo Header("Content-Type: image/jpg").$data;
> That should then mean that the php error messages become visable (or,
if
> there are none, a blank page will be displayed.
>
> Secondly, I didn't think you used echo with the header function.
Instead,
I
> normally do this:
> Header( "Content-Type: image/jpg" );
> echo $data;
> This may or may not fix your problem, but some help is better than
none!
> With any luck someone with more experiance in this field will read
your
> email in the not to distant future.
>
> Stephen
>
> ----- Original Message ----- 
> From: "Simon Taylor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 10, 2003 1:19 PM
> Subject: [PHP-WIN] Extracting images from active directory using php
>
>
> > Hi All,
> > I am busy trying to display an image extracted from the active
directory
> on
> > our intranet. This is what I have so far, I have searched the net on
this
> > and come up with very little info.
> > The following just shows a page stating it could not display the
image
> > because it had errors. If anyone has had experience with this please
> help...
> >
> > <?php
> > $ldap_server = 'ldap://server.world.com';
> > $auth_user = '[EMAIL PROTECTED]';
> > $auth_pass = 'password';
> >
> > $res=ldap_connect($ldap_server);
> > $bind=ldap_bind($res,$auth_user,$auth_pass);
> >
> > $info = ldap_read($res,'CN=Joe
> > Bloggs,OU=Users,DC=world,DC=com','objectclass=*');
> >
> >
> > $ar = ldap_get_entries($res,$info);
> > $data = $ar[0]['thumbnailphoto'][0];
> >
> > echo Header("Content-Type: image/jpg").$data;
> > ?>
> >
> > Cheers
> > Simon
> >
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to