I am trying to connect to memcache as they suggest:
$memcache = new Memcache();
$memcache->pconnect('localhost',11211);
But i get:
Notice: Memcache::pconnect() [memcache.pconnect]: Server localhost (tcp 11211) failed with: Connection refused (111) in /home/user/public_html/website.com/includes/basedatos.php on line 26
Any idea why?
From the memcached wiki: When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order.
You need to actually install the memcached
server so that it can be connected to. On CentOS, this can be done with...
sudo yum install memcached
(on debian flavors of linux, use apt-get
instead of yum
)
This may be obvious, but make sure that memcached is actually running:
service memcached start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With