<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux, Open Source and Web 2.0 &#187; PECL</title>
	<atom:link href="http://www.itecsoftware.com/tag/pecl/feed" rel="self" type="application/rss+xml" />
	<link>http://www.itecsoftware.com</link>
	<description>Itec Software</description>
	<lastBuildDate>Wed, 16 Nov 2011 02:18:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Hot To Install Memcache And PHP Client On Mac Snow Leopard</title>
		<link>http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=hot-to-install-memcache-and-php-client-on-mac-snow-leopard</link>
		<comments>http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard#comments</comments>
		<pubDate>Mon, 08 Feb 2010 23:59:32 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[PECL]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5-memache]]></category>

		<guid isPermaLink="false">http://articles.itecsoftware.com/?p=346</guid>
		<description><![CDATA[<a href="http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard" title="Hot To Install Memcache And PHP Client On Mac Snow Leopard"></a>I recently installed the memcached daemon on my MacBook Pro, incuding the necessary PHP client for development purposes. I just prefer to work locally instead of using a VM running Linux. And the process is actually quite simple and straight &#8230;<p class="read-more"><a href="http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard" title="Hot To Install Memcache And PHP Client On Mac Snow Leopard"></a><!-- google_ad_section_start --><p>I recently installed the memcached daemon on my MacBook Pro, incuding the necessary PHP client for development purposes. I just prefer to work locally instead of using a VM running Linux. And the process is actually quite simple and straight forward. Please note, I have included both clients, the old standard one and the newer PECL extension, because I deal with different applications and also lots of people seems to get confused when they install one version and their memcache classes cannot get instantiated and throw errors. So, if in doubt, just install both.</p>
<p>These are the five (four if you know which extension you want) components needed:</p>
<p>- libevent (requred library for memcached)</p>
<p>- memcached daemon</p>
<p>- libmemcached (required library for the php client)</p>
<p>- php extension (standard)</p>
<p>- php extension (PECL)</p>
<p>Now open your terminal and off we go:<span id="more-346"></span></p>
<p><em> Note: if you don&#8217;t want to install wget, you can alternatively use &#8220;curl -O&#8221;)</em></p>
<p><span style="color: #008000;"><strong><span style="color: #000000;">Installing libevent:</span></strong></span><br />
<span style="color: #008000;"><br />
$ cd /tmp<br />
$ wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz (if you&#8217;re brave, you can try the 2.0 beta)<br />
$ tar zxvf libevent-1.4.13-stable.tar.gz<br />
$ ./configure<br />
$ make<br />
$ sudo make install</span></p>
<p><span style="color: #008000;"><strong><span style="color: #000000;">Installing memcached:</span></strong></span></p>
<p><span style="color: #008000;">$ wget http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz<br />
$ tar xzvf memcached-1.4.1.tar.gz<br />
$ cd memcached-1.4.1<br />
$ ./configure<br />
$ make<br />
$ make test<br />
$ sudo make install</span><br />
<span style="color: #008000;">$ memcached -d -P pidfile -l 127.0.0.1</span> (this will start the memcached daemon)<br />
<span style="color: #008000;">$ ps aux | grep &#8216;memcached&#8217; <span style="color: #000000;">(this should confirm that memcached is running and how much memory is assigned to it)</span></span></p>
<p><strong><span style="color: #008000;"><span style="color: #000000;">Installing libmemcached:</span></span></strong></p>
<p><span style="color: #008000;">$ wget http://launchpad.net/libmemcached/1.0/0.34/+download/libmemcached-0.34.tar.gz<br />
$ tar -zxvf libmemcached-0.34.tar.gz<br />
$ cd libmemcached-0.34<br />
$ ./configure<br />
$ make<br />
$ sudo make install</span></p>
<p><strong><span style="color: #000000;">Installing PECL memcache extension:</span></strong></p>
<p><span style="color: #008000;">$ cd /tmp<br />
$ pecl download memcached<br />
$ tar xzvf memcached-1.0.0.tgz<br />
$ cd memcached-1.0.0<br />
$ phpize<br />
$ ./configure<br />
$ make<br />
$ sudo make install</span></p>
<p><strong><span style="color: #000000;">Installing PHP memcache extension:</span></strong></p>
<p><span style="color: #008000;">$ cd /tmp<br />
$ wget http://pecl.php.net/get/memcache-2.2.4.tgz<br />
$ tar -zxvf memcache-2.2.4.tgz<br />
$ cd memcache-2.2.4<br />
$ phpize &amp;&amp;<br />
$ ./configure<br />
$ make<br />
$ sudo make install</span></p>
<p>Once all the steps are completed successfully, ensure that the extension directory is specified as the same as the output of the terminal after the extensions installed. Otherwise correct in php.ini.</p>
<p>Also add the line(s) to load the extension(s) in the php.ini file, in the extension section:</p>
<p>extension=memcached.so<br />
extension=memcache.so</p>
<p>And finally restart apache:<br />
<span style="color: #008000;">$ sudo apachectl restart</span></p>
<p>And verify in phpinfo that memcache(d) is loaded and working.</p>
<!-- google_ad_section_end -->]]></content:encoded>
			<wfw:commentRss>http://www.itecsoftware.com/hot-to-install-memcache-and-php-client-on-mac-snow-leopard/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 3/11 queries in 0.004 seconds using memcached
Object Caching 394/410 objects using memcached

Served from: www.itecsoftware.com @ 2012-02-06 12:42:03 -->
