[imp] How are ldap prefs encoded?

Lee lee@disinfo.com
Fri, 28 Jun 2002 18:54:36 -0400


So I call unserialize(base64_decode($val)) right? When I print that I
get nothing (not even "Array"). How do I then access the values?

Thanks,
Lee


-----Original Message-----
From: Jon Parise [mailto:jon@horde.org] 
Sent: Friday, June 28, 2002 6:29 PM
To: Lee
Cc: imp@lists.horde.org
Subject: Re: [imp] How are ldap prefs encoded?

On Fri, Jun 28, 2002 at 05:31:08PM -0400, Lee wrote:

> I did look at the source code, and saw the base_64 being used.
> Unfortunately, as I said before when I run base64_decode() on the ldap
> values (ie. on the data stored in the ldap attribute 'identities'), I
> just get more junk. 
> 
> Any ideas what Im doing wrong?

The "junk" is serialized PHP data.  Call unserialize() to extract the
original array form of the data.
 
-- 
Jon Parise (jon@csh.rit.edu)  .  Information Technology (2001)
http://www.csh.rit.edu/~jon/  :  Computer Science House Member