I’m a php developer. In .NET we are able to store data in server in one variable.
It’s possible that we can store one array in apache server’s & get that?
I’m now using php_memcache.dll on my WAMP
$memcache_obj = memcache_connect('localhost',80);
memcache_set($memcache_obj, 'var_key', 'some variable', MEMCACHE_COMPRESSED , 0);
echo memcache_get($memcache_obj, 'var_key');
when i’m doing this memcache_set return false & gives warning
Notice: memcache_set() [function.memcache-set]: Server localhost (tcp 80) failed with: Failed reading line from stream (0) in abc file
I think there is a misunderstanding.
Not in Apache, but in
memcached(it is also a server, aka “memory cache daemon” == memcached).Apache and memcached are different things. They co-exist.
Okay, this is the client library for memcache. It provides you the
memcache_set()andmemcache_get()functions in PHP.It does not automatically provide a memcache server. Read here on how to setup memcache in a windows environment. Memcache is not originally developed to support windows, but there is a ported version of it.
Once set up correctly, you will need to change your first line:
Port 80 is HTTP, which is served by Apache – memcache runs on port 11211 in most default setups: