Skip to main content

Installing the PHP "memcached" Extension on OS X MAC

To disable System Integrity Protection, boot into recovery mode by restarting and then holding ⌘R as you hear the startup chime. Then start the Terminal from the Utilities menu.
Run the following command
$ csrutil disable
Then reboot. You are good to go.
If you wish to turn it back on, which you probably should when you are done, follow the instructions above but instead use:
$ csrutil enable

The first step is to install the latest and greatest Xcode.
Install the Xcode developer tools. Apple seems to have removed this option from the preferences so you'll need to handle this from the command line.
$ xcode-select --install
Next we will install the required dependencies. If you are not already using Homebrew you should be.
$ brew install wget autoconf pkg-config libmemcached
You will also want to make sure you have PEAR installed; instructions can be found here but can be summarized as follows:
$ wget http://pear.php.net/go-pear.phar
$ php go-pear.phar
Then in the /tmp directory we will create a folder we can work in.
$ cd /tmp
$ mkdir memcached-work
$ cd memcached-work
Then we will use pecl, part of pear, to fetch the current version of the extension. The version of the memcached extension will vary so you may need to update your paths accordingly.
$ pecl download memcached
$ open memcached-{{version}}.tgz
$ cd memcached-{{version}}/memcached-{{version}}
$ phpize
$ ./configure
$ make
$ sudo make install
Finally you will need to add the following line to your php.ini
extension = memcached.so
You can verify your installation with the following:
$ php --info | grep memcached\\.
Depending on your setup now you may want to restart apache.
$ sudo apachectl restart
You should be all set to go! Godspeed.

Comments

Popular posts from this blog

Magento-Concept

1) Mcrypt : This is an interface to the mcrypt library, which supports a wide variety of block algorithms such as DES, TripleDES, Blowfish (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and GOST in CBC, OFB, CFB and ECB cipher modes. Additionally, it supports RC6 and IDEA which are considered "non-free". CFB/OFB are 8bit by default. 2) Mhash : These functions are intended to work with » mhash. Mhash can be used to create checksums, message digests, message authentication codes, and more. This is an interface to the mhash library. Mhash supports a wide variety of hash algorithms such as MD5, SHA1, GOST, and many others. 3) Simplexml : The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object that can be processed with normal property selectors and array iterators. 4) DOM : The DOM extension allows you to op  erate on XML documents through the DOM API with PHP 5. 5) InnoDB storage engine : InnoDB is ...

What are the advantages and disadvantages of using zsh instead of bash (or other shells)?

Everything y ou kno w from bash  still  applies, but zsh does a bunch of other useful things.  I  know that I use only a small subset of them, but t hese are especially useful for me: Extended globbing: For example,  *(.)  matches only regular files, not directories, whereas  a*z(/)  matches directories whose names start with  a  and end with  z . There are a bunch of other things, such as  **  as described by  Ole Tange . Inline glob expansion: For example, type  rm *.pdf  and then hit tab. The glob  *.pdf  will expand inline into the list of .pdf files, which means you can change the result of the expansion, perhaps by removing from the command the name of one particular file you don’t want to  rm . Interactive path expansion: Type  cd /u/l/b  and hit tab. If there is only one existing path each of whose components start...