Question:
Good afternoon.
Memcache is connected. Working. How to connect memcached? Please tell me an example. Is there a need to register in the Apache or in php.ini? I write that it does not exist:
Fatal error: Class 'Memcached' not found
Thank you.
Answer:
I'll leave a small instruction on how to install memcache
because the topic seems to be relevant:
- Updating the repository:
apt-get update
- Install the
memcached
daemon and module:
apt-get install memcached php5-memcached
- Checking the launch of the daemon:
netstat -tap | grep memcached
tcp 0 0 localhost: 11211 : LISTEN 21448 / memcached
- Restarting the webserver
For apache2
:
service apache2 restart
For php-fpm
:
service php5-fpm restart