note 107609 modified in memcached.installation by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 20:38:53 +0000 |
| Subject: | note 107609 modified in memcached.installation by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187820@lists.php.net to get a copy of this message | ||
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
--was--
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?
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
http://php.net/manual/en/memcached.installation.php