Require Windows build of Memcache

2011-01-04 Thread Vitold S
Hello,

I am Web developing at Winows platform and I am want tu use Memcache,
but I am cant use last version with all interesting function...
Plaease make at memcache.org build or port to Wienows...

Thanx.


cross-compile memcached for mips architecture

2011-01-04 Thread Shoma
Hi,

I am using memcached-1.4.5. Trying to cross compile this for mips
architecture. But facing issue while configuring it.

In the configure script, there is part which checks if we are doing a
cross compile, and if so, it exits.
The checking for cross-compile starts from here:


SUNCC=no
{ $as_echo $as_me:$LINENO: checking for Sun cc in use 5
$as_echo_n checking for Sun cc in use...  6; }
if test $cross_compiling = yes; then
  { { $as_echo $as_me:$LINENO: error: in \`$ac_pwd': 5
$as_echo $as_me: error: in \`$ac_pwd': 2;}
{ { $as_echo $as_me:$LINENO: error: cannot run test program while
cross compiling
See \`config.log' for more details. 5
$as_echo $as_me: error: cannot run test program while cross compiling
See \`config.log' for more details. 2;}
{ (exit 1); exit 1; } ; }; }
--

Because of the above shown piece of code, configuring memcached for
mips architecture is not possible.

Can anyone please tell me, how to come over this issue? ie. what
changes to make to configure and compile memcached for mips
architecture?


Thanks in advance
--
BRs
Shoma


Install Memcached

2011-01-04 Thread Gustavo Paixão
HI,

I'm new with memcached, I'l like to know hot to install in my server, RHEL 5
with CPanel. I'm trying to install by CPanel, I found this module:

memcached 1.0.2 stable PHP extension for interfacing with memcached
via libmemcached library

but when I install I get this message below. Do you know what is wrong and
what I need to do?

downloading memcached-1.0.2.tgz ...
Starting to download memcached-1.0.2.tgz (22,724 bytes)
done: 22,724 bytes
4 source files, building
running: phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No:  20090626
Zend Extension Api No:   220090626
building in /root/tmp/pear-build-root/memcached-1.0.2
running: /root/tmp/pear/memcached/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php
-I/usr/local/include/php/main -I/usr/local/include/php/TSRM
-I/usr/local/include/php/Zend -I/usr/local/include/php/ext
-I/usr/local/include/php/ext/date/lib
checking for PHP extension directory...
/usr/local/lib/php/extensions/no-debug-non-zts-20090626
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... invalid
configure: WARNING: You will need re2c 0.13.4 or later if you want to
regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable memcached support... yes, shared
checking for libmemcached... yes, shared
checking whether to enable memcached session handler support... yes
checking whether to enable memcached igbinary serializer support... no
checking for ZLIB... yes, shared
checking for zlib location... /usr
checking for session includes... /usr/local/include/php
checking for memcached session support... enabled
checking for memcached igbinary support... disabled
checking for libmemcached location... configure: error: memcached
support requires libmemcached. Use --with-libmemcached-dir= to specify
the prefix where libmemcached headers and library are located
ERROR: `/root/tmp/pear/memcached/configure' failed
The memcached.so object is not in
/usr/local/lib/php/extensions/no-debug-non-zts-20090626


Re: Require Windows build of Memcache

2011-01-04 Thread Matt Ingenthron
Hi Vitold,

On 12/31/10 3:54 PM, Vitold S wrote:
 Hello,

 I am Web developing at Winows platform and I am want tu use Memcache,
 but I am cant use last version with all interesting function...
 Plaease make at memcache.org build or port to Wienows...

memcached.org provides only source. 

Trond Norbye posted instructions on how to build on windows on his blog:
http://trondn.blogspot.com/2010/03/building-memcached-windows.html

The trunk code has changed a little, but that should get you most of the
way there.

Matt


Re: Install Memcached

2011-01-04 Thread Matt Ingenthron
On 1/4/11 6:06 AM, Gustavo Paixão wrote:
 HI,

 I'm new with memcached, I'l like to know hot to install in my server,
 RHEL 5 with CPanel. I'm trying to install by CPanel, I found this module:

 memcached 1.0.2 stable PHP extension for interfacing with
 memcached via libmemcached library

 but when I install I get this message below. Do you know what is wrong
 and what I need to do?

From the log below, it looks as if you're missing a prerequisite:
libmemcached.  You'll need to install that before this pecl extension
will work. 

You may want to read any docs for that extension though, as in my
experience, the version of libmemcached it relies upon may be somewhat
specific.


 downloading memcached-1.0.2.tgz ...
 Starting to download memcached-1.0.2.tgz (22,724 bytes)
 done: 22,724 bytes
 4 source files, building
 running: phpize
 Configuring for:
 PHP Api Version: 20090626

 Zend Module Api No:  20090626
 Zend Extension Api No:   220090626
 building in /root/tmp/pear-build-root/memcached-1.0.2
 running: /root/tmp/pear/memcached/configure
 checking for egrep... grep -E
 checking for a sed that does not truncate output... /bin/sed

 checking for cc... cc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...

 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether cc accepts -g... yes
 checking for cc option to accept ANSI C... none needed
 checking how to run the C preprocessor... cc -E

 checking for icc... no
 checking for suncc... no
 checking whether cc understands -c and -o together... yes
 checking for system library directory... lib
 checking if compiler supports -R... no
 checking if compiler supports -Wl,-rpath,... yes

 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-pc-linux-gnu
 checking target system type... i686-pc-linux-gnu
 checking for PHP prefix... /usr/local
 checking for PHP includes... -I/usr/local/include/php 
 -I/usr/local/include/php/main -I/usr/local/include/php/TSRM 
 -I/usr/local/include/php/Zend -I/usr/local/include/php/ext 
 -I/usr/local/include/php/ext/date/lib

 checking for PHP extension directory... 
 /usr/local/lib/php/extensions/no-debug-non-zts-20090626
 checking for PHP installed headers prefix... /usr/local/include/php
 checking if debug is enabled... no
 checking if zts is enabled... no

 checking for re2c... re2c
 checking for re2c version... invalid
 configure: WARNING: You will need re2c 0.13.4 or later if you want to 
 regenerate PHP parsers.
 checking for gawk... gawk
 checking whether to enable memcached support... yes, shared

 checking for libmemcached... yes, shared
 checking whether to enable memcached session handler support... yes
 checking whether to enable memcached igbinary serializer support... no
 checking for ZLIB... yes, shared

 checking for zlib location... /usr
 checking for session includes... /usr/local/include/php
 checking for memcached session support... enabled
 checking for memcached igbinary support... disabled
 checking for libmemcached location... configure: error: memcached support 
 requires libmemcached. Use --with-libmemcached-dir=
 to specify the prefix where libmemcached headers and library are
 located ERROR: `/root/tmp/pear/memcached/configure' failed The
 memcached.so object is not in
 /usr/local/lib/php/extensions/no-debug-non-zts-20090626






Re: Memcache doesn't work when used in Magento

2011-01-04 Thread Matt Ingenthron
On 1/4/11 6:13 AM, Shabam wrote:
 I have installed a Magento in a Web Cluster(include two web server)
 and Magento work fine in any independent server.

 In order to improve performance and shared session between multiple
 Web servers, I config Magento save session to memcache server. But
 now, I found can’t login into magento admin panel(input username and
 password, then click OK button, it will return admin login page and
 display no error message) and can’t add item to cart(tell us cart is
 empty).

 Can someone help me diagnose or tell me how to go about
 troubleshooting this problem?  I've posted it on the Magento forums
 but no one is responding.

I'm sorry, I don't know anything about Magento session handling with
memcached, but I may have a general idea for you.

If you can, run memcached from the command line in another terminal with
-vvv.  Then try your login.  This should show you what, if anything, is
done with memcached when you try to log in. 

If I had to guess though, I think the problem you're running into is
likely somewhere else... possibly getting the connection going.

Regards,

Matt
 [r...@localhost etc]# cat local.xml
 ?xml version=1.0?
 config
 global
 install
 date![CDATA[Fri, 17 Dec 2010 09:34:20 +]]/date
 /install
 crypt
 key![CDATA[helloisme]]/key
 /crypt
 disable_local_modulesfalse/disable_local_modules
 session_save![CDATA[memcache]]/session_save !-- db / memcache /
 empty=files --
 session_save_path![CDATA[tcp://192.168.1.68:11211?
 persistent=1weight;=2timeout;=10retry;_interval=10]]/
 session_save_path
 session_cache_limiter![CDATA[must-revalidate,public]]/
 session_cache_limiter
 cache
 backendmemcached/backend!-- apc / memcached / empty=file --
 memcached!-- memcached cache backend related config --
 servers!-- any number of server nodes can be included --
 server
 host![CDATA[192.168.1.68]]/host
 port![CDATA[11211]]/port
 persistent![CDATA[1]]/persistent
 /server
 /servers
 compression![CDATA[0]]/compression
 cache_dir![CDATA[]]/cache_dir
 hashed_directory_level![CDATA[]]/hashed_directory_level
 hashed_directory_umask![CDATA[]]/hashed_directory_umask
 file_name_prefix![CDATA[]]/file_name_prefix
 /memcached
 /cache
 resources
 db
 table_prefix![CDATA[]]/table_prefix
 /db
 default_setup
 connection
 host![CDATA[192.168.1.239]]/host
 username![CDATA[magento]]/username
 password![CDATA[asdf000!]]/password
 dbname![CDATA[magento]]/dbname
 active1/active
 /connection
 /default_setup
 /resources
 session_save![CDATA[files]]/session_save
 /global
 admin
 routers
 adminhtml
 args
 frontName![CDATA[admin]]/frontName
 /args
 /adminhtml
 /routers
 /admin
 /config



Online chat with memcached

2011-01-04 Thread - -
hello,
I'm trying to write a chat server with memcached. I decided to use memcache
because of

   1. Faster than using HDD ( Database )
   2. Cheaper than using HDD ( Database )
   3. No need to save history

I want to take information from you about how much is it logical.

I'm using php and javascript

chat.php

There is a two JS function.
getmessage: every one second making a request to getmessage.php
setmessage: sending input valutes to setmessage.php

getmessage.php
getCache($room,$data); ( $data is array hold username and text )
remove($room)

setmessage.php
setCache($room,$data)


But it's not working as i want. When there are 2 or more users, message
doesn't go everyone.

I used lock's but it didn't work.

Is there any example, that i can take a look  ?

Is it logical to write a chat with memcached ?

Thank you


Re: Online chat with memcached

2011-01-04 Thread Husseyn Alaouieh
Hi, i´m doing the same, but in asp.net.

instead of send requests to server, use a while(true) loop to keep sending
info for the client.

if the interval between the messages is larger, back to the js getmessage.

now, to your question:

how are you selecting the data?

2011/1/4 - - alo...@gmail.com

 hello,
 I'm trying to write a chat server with memcached. I decided to use memcache
 because of

1. Faster than using HDD ( Database )
2. Cheaper than using HDD ( Database )
3. No need to save history

 I want to take information from you about how much is it logical.

 I'm using php and javascript

 chat.php

 There is a two JS function.
 getmessage: every one second making a request to getmessage.php
 setmessage: sending input valutes to setmessage.php

 getmessage.php
 getCache($room,$data); ( $data is array hold username and text )
 remove($room)

 setmessage.php
 setCache($room,$data)


 But it's not working as i want. When there are 2 or more users, message
 doesn't go everyone.

 I used lock's but it didn't work.

 Is there any example, that i can take a look  ?

 Is it logical to write a chat with memcached ?

 Thank you


Re: Online chat with memcached

2011-01-04 Thread - -

 function shoutcast() {
 var _sRandom = Math.random();
 send = $(#single).val();

 oba = getAndSetMessages.php?action=setMessagesvalue= + send +'_r=' +
 _sRandom,


  $.ajax({
type: 'GET',
url: getAndSetMessages.php?action=setMessagesvalue= + send +'_r=' +
 _sRandom,
timeout: 2000,
success: function(sonuc) {
 $('.sonuc').append(sonuc);
 } });
 return true;

 }


This is Js function to send data.

?

 include memcache.php;
 $room = roomName;
 $username = Username;
 if($_GET['action'] == getMessages) {
 $data = getCache($room);
 //var_dump($data);

 if($data !== false) {
 if($data[2] == false) {
 echo $data[0]: $data[1]br / br /;
 $data[2] = true;
 sleep(1);
 $memcache-delete($room);

 }
 }

 }
 else if($_GET['action'] == setMessages) {

 $data = array($username,$_GET['value'],false);
 setCache($room,$data);

 }
 ?



and this is set and get message.

What is the differance between  1 requrest per second and while loop ?

My problem is that, after some time ( 10 minutes ), chat.php doesn't work
anymore.
Also some messages doesn't go everyone.


On Tue, Jan 4, 2011 at 9:12 PM, Husseyn Alaouieh huhuss...@gmail.comwrote:

 Hi, i´m doing the same, but in asp.net.

 instead of send requests to server, use a while(true) loop to keep sending
 info for the client.

 if the interval between the messages is larger, back to the js getmessage.

 now, to your question:

 how are you selecting the data?

 2011/1/4 - - alo...@gmail.com

 hello,
 I'm trying to write a chat server with memcached. I decided to use
 memcache because of

1. Faster than using HDD ( Database )
2. Cheaper than using HDD ( Database )
3. No need to save history

 I want to take information from you about how much is it logical.

 I'm using php and javascript

 chat.php

 There is a two JS function.
 getmessage: every one second making a request to getmessage.php
 setmessage: sending input valutes to setmessage.php

 getmessage.php
 getCache($room,$data); ( $data is array hold username and text )
 remove($room)

 setmessage.php
 setCache($room,$data)


 But it's not working as i want. When there are 2 or more users, message
 doesn't go everyone.

 I used lock's but it didn't work.

 Is there any example, that i can take a look  ?

 Is it logical to write a chat with memcached ?

 Thank you





Re: Require Windows build of Memcache

2011-01-04 Thread Marc Bollinger
Wasn't NorthScale working on an informal Windows build awhile ago? Did
that just fizzle due to other priorities (e.g. releasing membase)?

- Marc

On Tue, Jan 4, 2011 at 10:43 AM, Matt Ingenthron ingen...@cep.net wrote:
 Hi Vitold,

 On 12/31/10 3:54 PM, Vitold S wrote:
 Hello,

 I am Web developing at Winows platform and I am want tu use Memcache,
 but I am cant use last version with all interesting function...
 Plaease make at memcache.org build or port to Wienows...

 memcached.org provides only source.

 Trond Norbye posted instructions on how to build on windows on his blog:
 http://trondn.blogspot.com/2010/03/building-memcached-windows.html

 The trunk code has changed a little, but that should get you most of the
 way there.

 Matt



Re: Require Windows build of Memcache

2011-01-04 Thread Matt Ingenthron
Hi Marc,

On 1/4/11 1:46 PM, Marc Bollinger wrote:
 Wasn't NorthScale working on an informal Windows build awhile ago? Did
 that just fizzle due to other priorities (e.g. releasing membase)?

NorthScale (now known as Membase, Inc.) did have a straight compilation
of memcached for Windows available as a binary.  Since Membase now has
support for a memcached bucket type and there were missing pieces that
weren't going to be added, Membase, Inc. isn't providing binaries any
longer.

Membase's memcached bucket type is generally more along the lines of
what people were asking for, since it runs as a Windows service
properly, gives you a way to change the amount of memory an instance is
using, etc. 

With the compiled binaries we distributed, we kept getting emails asking
for that kind of functionality but only had plans to add it in with the
memcached bucket type.  The way it was being done with the Windows
service wasn't really right.

There are some other differences too, which is why I didn't think I
should just point to it on this list (though it is available for free). 
Since you brought it up though...

By the way, along with Trond, Dustin, etc., I'm one of the Membase guys.

Regards,

Matt


 On Tue, Jan 4, 2011 at 10:43 AM, Matt Ingenthron ingen...@cep.net wrote:
 Hi Vitold,

 On 12/31/10 3:54 PM, Vitold S wrote:
 Hello,

 I am Web developing at Winows platform and I am want tu use Memcache,
 but I am cant use last version with all interesting function...
 Plaease make at memcache.org build or port to Wienows...
 memcached.org provides only source.

 Trond Norbye posted instructions on how to build on windows on his blog:
 http://trondn.blogspot.com/2010/03/building-memcached-windows.html

 The trunk code has changed a little, but that should get you most of the
 way there.

 Matt




Re: Install Memcached

2011-01-04 Thread Matt Ingenthron
On 1/4/11 10:07 PM, Gustavo Paixão wrote:
 Hi Matt,

 I was looking for libmemcached inInstall a Perl Module page at WHM
 and I found this *Memcached::libmemcached*, I try to install but I got
 some error. The error message is attached. Do you know if i did
 something wrong or if a need to install something before?

Just a guess from looking at the log, but I don't know for certain, is
that there might be something a bit too old with your toolchain on
CentOS 5, depending on the update version.  Perhaps an older one would
build cleanly?

That's just a guess though... it'd require more digging to see why.  I
doubt libmemached-0.44 is broken in general.

Perhaps try an older one and/or try just building the lib directly
rather than getting it through a perl module.

Hope that helps some,

Matt


Re: Issue 177 in memcached: jboss向cache里存取 值,为何在其它地方取不出来值

2011-01-04 Thread memcached


Comment #3 on issue 177 by Steven.L.Liu: jboss向cache里存取值,为何在其它地 
方取不出来值

http://code.google.com/p/memcached/issues/detail?id=177

1. make sure you use the same memcahced client as jboss's memcached client
2. your problem is the memcached client's problem, not memcached's.