downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

実行時設定> <要件
[edit] Last updated: Fri, 25 May 2012

view this page in

インストール手順

この PECL 拡張モジュールをインストールする方法は、 マニュアルの PECL 拡張モジュールのインストール という章にあります。 新規リリース・ダウンロード・ソースファイル・管理者情報・CHANGELOG といった関連する情報については、次の場所にあります。 » http://pecl.php.net/package/memcached.

libmemcached のインストール先が標準の場所とは異なる場合は --with-libmemcached-dir=DIR スイッチを使用します。 ここで、DIR は libmemcached のインストールプレフィックスを表します。 このディレクトリ内に include/libmemcached/memcached.h がなければなりません。

圧縮をサポートするには Zlib が必要です。Zlib のインストール先が標準の場所とは異なる場合は、--with-zlib-dir=DIR スイッチを使用します。 ここで、DIR は Zlib のインストールプレフィックスを表します。

セッションハンドラのサポートはデフォルトで有効となります。これを無効にするには --disable-memcached-session スイッチを使用します。



実行時設定> <要件
[edit] Last updated: Fri, 25 May 2012
 
add a note add a note User Contributed Notes インストール手順
qeremy [at] gmail [dot] com 21-Feb-2012 09:32
Do not lose your time to install it on Ubuntu just trying "sudo apt-get install php5-memcached". There is something you need to do that sure installing memcached. Anyway...

Step 1.
$ sudo apt-get install memcached
Step 2.
$ sudo apt-get install php5-memcached
Step 3.
$ sudo /etc/init.d/apache2 restart

Ready!

What about some test?

<?php
error_reporting
(E_ALL & ~E_NOTICE);

$mc = new Memcached();
$mc->addServer("localhost", 11211);

$mc->set("foo", "Hello!");
$mc->set("bar", "Memcached...");

$arr = array(
   
$mc->get("foo"),
   
$mc->get("bar")
);
var_dump($arr);
?>

Hoping to help someone.
~Kerem
petermiller1986 att gmail dotttttttt com 11-Feb-2012 07:09
i'm planning on using membase for my website and i was really struggling to install the memcashed php client on ubuntu with pear, but actually there is an easier way:

$ sudo apt-get install php5-memcached

you dont even need to install the membase server first - this can be done afterwards. hope this helps someone!
Loreto Parisi 21-Sep-2010 05:44
memcached 1.0.1 will compile against libmemcached 0.34.

Due to bug http://pecl.php.net/bugs/bug.php?id=17395
memcached 1.0.2 requires libmemcached 0.39+ instead.
gpuk at dasserver dot com 02-Mar-2010 01:50
At present memcached-1.0.0 does not compile with libmemcached-0.38. This is apparently due to libmemcached chaning the API.

For evidence, see this bug: http://pecl.php.net/bugs/bug.php?id=17070

Note: I am encountering the same 'memcached_st' has no member named 'hash' error on a Debian lenny amd_64 box.
Clint Priest 09-Nov-2009 10:53
If your server has --enable-json=shared as mine did, this extension requires you to have extension=json.so to load properly.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites