This is a client thing, I was able to put and fetch from Python and .NET for instance, to the same memcached instance.<br><br><div><span class="gmail_quote">On 6/22/07, <b class="gmail_sendername">The Newb</b> <<a href="mailto:ne_wb@hotmail.com">
ne_wb@hotmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div> <br>
Hello,<br>
<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 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>
<br>
Thanks<br>
<br>
### PERL EXAMPLE<br>
<br>
use Cache::Memcached;<br>require Digest::MD5;<br>my $memd = new Cache::Memcached {<br> 'servers' => [ "<a href="http://127.0.0.1:11211" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
127.0.0.1:11211</a>"],<br> debug => 1<br> };<br>$memd->enable_compress(0);<br>$sess_id = "d116f2af6b07deaac588c8c34cca919b";<br>$session->{'first'} = "john";<br>$session->{'last'} = "smith";
<br>$session->{'session_id'} = $sess_id;<br> <br>$memd->set("$sess_id", $session,60);<br>
<br>
<br>
### MEMCACHE RESULT<br>
<br>
telnet <a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a> 11211<br>Trying 127.0.0.1...<br>Connected to localhost.localdomain (<a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
127.0.0.1</a>).<br>Escape character is '^]'.<br>get d116f2af6b07deaac588c8c34cca919b<br>VALUE d116f2af6b07deaac588c8c34cca919b 1 85<br>
d116f2af6b07deaac588c8c34cca919b<br>session_id<br>johnfirst<br>smithlast<br>END<br>
<br>
### PHP EXAMPLE<br>
<br>
$memcache = new Memcache;<br>$memcache->connect('<a href="http://127.0.0.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a>', 11211) or die ("Could not connect");
<br>$sess_id = "d116f2af6b07deaac588c8c34cca919b";<br>$session->first = "john";<br>$session->last = "smith";<br>$session->session_id = "$sess_id";<br>$memcache->set($sess_id,$session,false,900);
<br>
<br>
### MEMCACHE RESULT<br>
<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><span class="ad"><br><hr>Change is good. See what's different about Windows Live Hotmail. <a href="http://www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid=RMT_TAGLM_HMWL_reten_changegood_0607" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Check it out!</a></span></div><span class="ad">
</span></blockquote></div><br>