MemcacheD php client for development purpose on Laravel 5

This class simulates the real memcached php extension in windows which doesn’t exist (php_memcached.dll) – Note the “d”.
I forked and modified this repository so that it works with few basic methods of laravel 5… Please don’t use this class on production, use it only for development purposes.

Github repo: https://github.com/altinukshini/memcached-client

Configuration in Windows machine

Before you do anything else, make sure you have memcached server installed. Here’s a blog that shows how to do that (follow setp A): https://commaster.net/content/installing-memcached-windows

Assuming you have memcached server isntalled, proceed with the following.

Place memcached.php file in C:\xampp\php\pear folder

In your laravel 5 installation, edit AppServiceProvider.php and place the code below inside the boot() method.

if (!class_exists('Memcached')) {
    include ("memcached.php");
}

so it should look something like:

public function boot(Kernel $kernel)
{
    if (!class_exists('Memcached')) {
        include ("memcached.php");
    }
}

…you should be good to go!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s