<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>&nbsp;<BR>
Hello,<BR>
&nbsp;<BR>
I'm using Cache::Memcached on the PERL side and the PECL libraries for PHP in PHP 4.x. The data objects are session data that I would like to share between both languages, however when I&nbsp;telnet straight into the memcache daemon and do gets on the keys, it appears that the data objects are stored in completely different formats. Do I have a setting wrong, is this a permanent limitation, wrong library or not enough RTFM? It works fine in either language. I'm just missing the cross-compatability. If someone could point me toward correct answer, it would be much appreciated. <BR>
&nbsp;<BR>
Thanks<BR>
&nbsp;<BR>
### PERL EXAMPLE<BR>
&nbsp;<BR>
use Cache::Memcached;<BR>require Digest::MD5;<BR>my $memd = new Cache::Memcached {<BR>&nbsp;&nbsp;&nbsp; 'servers' =&gt; [ "127.0.0.1:11211"],<BR>&nbsp;debug =&gt; 1<BR>&nbsp; };<BR>$memd-&gt;enable_compress(0);<BR>$sess_id = "d116f2af6b07deaac588c8c34cca919b";<BR>$session-&gt;{'first'} = "john";<BR>$session-&gt;{'last'} = "smith";<BR>$session-&gt;{'session_id'} = $sess_id;<BR>&nbsp; <BR>$memd-&gt;set("$sess_id", $session,60);<BR>
&nbsp;<BR>
&nbsp;<BR>
### MEMCACHE RESULT<BR>
&nbsp;<BR>
telnet 127.0.0.1 11211<BR>Trying 127.0.0.1...<BR>Connected to localhost.localdomain (127.0.0.1).<BR>Escape character is '^]'.<BR>get d116f2af6b07deaac588c8c34cca919b<BR>VALUE d116f2af6b07deaac588c8c34cca919b 1 85<BR>
&nbsp;d116f2af6b07deaac588c8c34cca919b<BR>session_id<BR>johnfirst<BR>smithlast<BR>END<BR>
&nbsp;<BR>
### PHP EXAMPLE<BR>
&nbsp;<BR>
$memcache = new Memcache;<BR>$memcache-&gt;connect('127.0.0.1', 11211) or die ("Could not connect");<BR>$sess_id = "d116f2af6b07deaac588c8c34cca919b";<BR>$session-&gt;first = "john";<BR>$session-&gt;last&nbsp; = "smith";<BR>$session-&gt;session_id&nbsp; = "$sess_id";<BR>$memcache-&gt;set($sess_id,$session,false,900);<BR>
&nbsp;<BR>
### MEMCACHE RESULT<BR>
&nbsp;<BR>
get d116f2af6b07deaac588c8c34cca919b<BR>VALUE d116f2af6b07deaac588c8c34cca919b 1 123<BR>O:8:"stdClass":3:{s:5:"first";s:4:"john";s:4:"last";s:5:"smith";s:10:"session_id";s:32:"d116f2af6b07deaac588c8c34cca919b";}<BR>END<BR><br /><hr />Change is good. See what's different about Windows Live Hotmail. <a href='www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid=RMT_TAGLM_HMWL_reten_changegood_0607' target='_new'>Check it out!</a></body>
</html>