Skip to main content

Posts

Showing posts from March 3, 2013

How to use Memcache with PHP

Memcache with PHP Today I have new article for PHP. Last time I did post about  Memcache with PHP . Today we will talking about caching in PHP again. I will show you how you can use  Memcache in PHP . We will prepare useful class for working with Memcache for us and several examples. Memcache itself providing procedural and object oriented interface to memcached, highly effective caching daemon, which was especially designed to decrease database load in dynamic web applications. I don`t have online demo for today, just because haven`t installed Memcache at our hosting. But I will include samples of using our new library in this article too (as I did for our previous APC-related post). Also, pay attention that Memcache extension not bundled with PHP by default. This extension available in PECL.  Step 1. PHP I made this useful class for you. We will use this class to working with memory using Memcache system. classes/memcache.caching.php oCache = new Memcache(...

Step By Step Guide To Install Memcache On Linux

This post is more like a note to me, so that in future I can look up for steps involved in installing  memcache  on Linux servers like Centos or RHEL. Those of you who  follow me on twitter , will know that me and my friends spends hours trying to install memcache on one of our web server. Normally this is a five minute job, but unfortunately for us those tricks did not work out. So if you have tried YUM and APT-GET and still could not install the memcache then read on, to find the alternate( read manual, without magic ) way of doing it. When we talk about Memcache their two things that needs to be installed Memcache Daemon  know as memcached, and Memcache client  for your programing language, in this case PHP. Installing Memcache Daemon Note these steps has been taken from http://in2.php.net/manual/en/memcache.installation.php Steps to install Libevent(memcached dependency) First we need to check if libevent is installed or not? type...