problems with PHP and memcached

Antony Dovgal
Tue, 8 Jun 2004 10:26:23 +0400

On Mon, 7 Jun 2004 17:54:14 -0700
Steve Simitzis <> wrote:

> i'm familiar with the PECL client, but it lacks documentation (unless
> someone can point me to it)

I'll finish docs in some days.
Guys from PHP Group said some time ago, that they plan to merge PECL
docs with main PHP documentation, so I was too lazy to write docs
But I'll do it, though. Sorry for the delay.

>, and in looking through the source and the
> included example code, it wasn't clear in the slightest whether or not
> the client would support connecting to memcacheds running on multiple
> machines. so, i chose a client that had docs and overtly supported all
> of the features i wanted to use.

No, it doesn't.
PECL module has nothing to do with multiple servers.
Just write your own app, which will handle as much servers as you

> the PECL client's example php code connected to only one memcached,
> and in trying the code out (using reasonable guesses), i wasn't able
> to connect to multiple servers. anyone know if it's possible, or if
> there are any docs anywhere to be found?

$server1 = memcache_connect('host1', 11211);
$server2 = memcache_connect('host2', 11211);
This should help, I believe =)
Antony Dovgal aka tony2001 ||