Tag Archives: Memcached PHP Libraries

Know Whether Your Server’s Memcached Service Is Listening On Port 11211

If you’re not sure whether your dedicated server‘s Memcached service is listening on port 11211 i.e. it is installed and running properly, there are some easy tests you can do to make sure everything is operating fine.

Before you start, enable the administrator access on your server (in case you have not), connect via SSH then switch to the root user.

Next, in the command line, type the following command and PRESS ENTER:

telnet localhost 11211

This will report to you back that it was able to connect to the service.

[root@server[~]: telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

In case, if it’s not installed properly, you will see something like this:

[root@transfer[~]: telnet localhost 11211
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

And you will not be able to connect to the service.

In the next lesson, you will learn about testing the presence of the needed PHP libraries to make Memcached work for you.

Configured Memcached PHP Libraries On Your Server, Next What?

In the previous lessons, you have learned about installing Memcached PHP Libraries and configuring Memcached Daemon on your dedicated server. Now next steps are to configure your apps and websites to use them so that you can get their real benefit.

So once you get the Memcached Daemon and PHP libraries installed on your CentOS-based dedicated server, you are required to configure your PHP application to use Memcached. In case you don’t it, Memcached is going to use your server resources without providing you any of the advantages.

Before starting, the system recommends you take a backup of your websites and then follow the changes outlined below.

WordPress users can take its benefit simply by using a plugin called W3 Total Cache Plugin. Yes, there are many other plugins as well but the system finds it best for most of its users. If in case this plugin doesn’t suit you or it is in conflict with some other plugin you are using, it that’s your case then you can choose some other plugin such as Batcache, Cachify, Memcached-Redux, etc.

In this lesson, you will learn about configuring the first and the best one i.e. W3 Total Cache. Simply start by installing-activating the plugin and then to configure, navigate to the Performance -> General Settings page.

Next, make sure the Enable tickbox is checked and Memcached is selected with the cache method for:

  • Page Cache
  • Object Cache
  • Database Cache
  • Fragment Cache

Once you do this, your website starts to use the Memcached services for imporving the performace of your website at the same time reducing the load on your dedicated server.

Configuring Memcached PHP Libraries On Your Dedicated Server

The dedicated servers at SANGKRIT.net offer you the option to configure your object caching system in the way that suits you best.

The lesson will guide you on how and why configuring Memcached PHP Libraries on your Linux-based dedicated server benefits you.

Memcached is one free object caching system that can be installed on your server for improving the performance of your website. It only works when you install the daemon, install the PHP libraries and configure your PHP application correctly.

You can easily do all that by following these steps:

  1. Login to your SANGKRIT.net account
  2. Visit your My Products page
  3. Click the Servers option
  4. Click Manage
  5. Open WHM

Next, on the WHM panel follow these steps:

  1. From the Software section on the left, select EasyApache 4
  2. Click the Customize button present in the Currently Installed Packages section.
  3. Click PHP Libraries on the left
  4. Type Memcached in the search box
  5. Click the button to install Memcached on the desired versions of PHP
  6. Click the Review button on the left,
  7. Click the Provision button at the bottom of the page

The installation should be complete now.

Apart from this, you should also know that the same modules can also be installed with yum in SSH. But be very conscious about the naming convention i.e. ea-php72-php-memcached. It must be installed on each version of PHP.

The next coming lesson will help you in the process of installing and managing the Memcached Daemon.