How to Configure and Enable Memcached on phpbb 3.2 with PHP 7.xx

by Sandeep B.

In this tutorial we’ll install Memcached and configure it in phpbb 3.2, which not only lower the server load also make you phpbb forum super fast I meant lightening fast. Memcached is used to lower the database load, it will cache the frequently used MySQL query and save as key cache on RAM – which will save the precious juice for another tasks.

For this tutorial full root access is required also it will work on shared hosting (cpanel) if memcached and php memcached are installed and enabled for your account.

Lets get started :-

Installing Memcached and PHP Memcached :

Centos/RHEL 6/7 :

First install Remi repo :-

CentOS 7

rpm -Uvh remi-release-7.rpm

CentOS 6

rpm -Uvh remi-release-6.rpm

To install Memcached :

yum install memcached

Start memcached Service and enable on boot :

service memcached start

#Centos/RHEL 7
systemctl enable memcached

#Centos/RHEL 6
chkconfig memcached on

Ubuntu 16.04/18.04 LTS and other forks :

apt-get update
apt-get install memcached

Installing PHP Memcached :

Now We’ll Build and install PHP MEMCACHED on php 7.xx (official) :

cd /root
git clone
cd php-memcached
git checkout php7
make install

If you get SASL error then we need disable sasl flag added to the config:

cd /root
git clone
cd php-memcached
git checkout php7
./configure --disable-memcached-sasl
make install

Now you need to add this line to your php.ini  to enable this php extension  :

Then at last restart apache/php-fpm service and done, you can then check phpinfo and search “memcached” if it is there then you’ve successfully installed php-memcached and memcached.

Configuring phpbb 3.2 with Memcached :

Edit config.php and find this line :

$acm_type = 'phpbb\\cache\\driver\\file';

Change it TO :

$acm_type = 'phpbb\\cache\\driver\\memcached';

save and exit, you’ve successfully enabled memcached for phpbb

also don’t forget to purge the forum cache.

If this post helps you in any way please consider a donation

Donate with PayPal :


You may also like

Leave a Comment