- Joined
- Dec 8, 2012
- Messages
- 773
- Points
- 63
To install PHP-memcached on your hosting sytem, firstly you must install memcached on the server. See link below to install memcached.
https://forumweb.hosting/13639-how-to-install-memcached-on-centos-6-x.html
How to install
1. Check memcached is existed on hosting server or not
For example
2. Check php-memcached if it was installed or not yet
If yes, it will show this
If not, it shows nothing and you can start install php memcache
3. Install php-memcache
Install packages to support for installing php memcache
Install php-memcache
Enable memcache
Check Loaded Configuration File by the command
for example:
Add module memcache into PHP
or
Adding
Restart your web server to reload php.ini
4. Check php-memcache module is working or not
It should show this
If the result is memcache then you successfully install memcache module to PHP
You also can check by using phpinfo() and you can see it in your browser like this
Hope it helps!
https://forumweb.hosting/13639-how-to-install-memcached-on-centos-6-x.html
How to install
1. Check memcached is existed on hosting server or not
Code:
service memcached status
Code:
[root@server /]# service memcached status
memcached (pid 12314) is running...
Code:
php -m | grep memcache
Code:
[root@server /]# php -m | grep memcache
memcache
3. Install php-memcache
Install packages to support for installing php memcache
Code:
yum install php-devel php-pear -y
Install php-memcache
Code:
yum install libmemcached-devel
Code:
pecl install memcache
Enable memcache
Check Loaded Configuration File by the command
Code:
php -i | grep php.ini
Code:
[root@server /]# php -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini
Code:
echo "extension=memcache.so" >> /usr/local/lib/php.ini
Code:
Nano /usr/local/lib/php.ini
Code:
extension=memcache.so
Code:
Service httpd restart
4. Check php-memcache module is working or not
Code:
php -m | grep memcache
Code:
[root@srv /]# php -m | grep memcache
memcache
You also can check by using phpinfo() and you can see it in your browser like this
Hope it helps!