<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://jackxiang.com/post//</link>
<title><![CDATA[使用 memcache 来存储 session]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Sun, 01 Nov 2009 06:10:37 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	使用memchche代替php默认的file来存储session，能够实现更快的速度，而且很容易实现多主机共享session的需求。本文简要介绍一下安装设置的办法<br/><br/>系统环境:FreeBSD6.1 ,apache2.2.3, php5.2.0<br/><br/>1.首先安装memcache，因为是在FreeBSD环境下，所以我们采用最简单的ports方式来安装memcache<br/><br/>cd /usr/ports/databases/memcached/<br/>make install clean<br/><br/>ports会自动寻找源进行下载，然后编译安装<br/>安装好memcache以后，编辑/etc/rc.conf文件，在最后一行加一句memcached_enable=&quot;YES&quot;<br/>然后保存退出。memcache会随着开机自动启动，手动启动的命令是：<br/>/usr/local/etc/rc.d/memcached start<br/>好了，现在memcache已经安装并启动完毕了。<br/><br/>2.安装pecl::memcache扩展，这是php的扩展，安装以后可以使用Memcache函数库，php手册上有详细的使用法说明。<br/><br/>cd /usr/ports/databases/pecl-memcache/<br/>make install clean<br/><br/>安装好以后，会自动在/usr/local/etc/php/extension.ini 加上一行 extension=memcache.so<br/>用命令查看一下：<br/>cat /usr/local/etc/php/extensions.ini<br/>如果看见最后一行有 extension=memcache.so<br/>说明已经安装好了，这个时候重新启动一下apache server即可，phpinfo()可以看到memcache扩展的信息。<br/><br/>3.设置session用memcache来存储<br/><br/>编辑php.ini文件，做如下修改<br/>session.save_handler = memcache<br/>session.save_path = &quot;tcp://127.0.0.1:11211&quot;<br/>当然，也可以在httpd.conf文件中加上,前提是php以模块方式载入，如果是cgi方式无效<br/>php_value session.save_handler &quot;memcache&quot;<br/>php_value session.save_path &quot;tcp://127.0.0.1:11211&quot;<br/><br/>重启一下，apache server，好了，写一小段测试代码看看session是否正常吧
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] 使用 memcache 来存储 session]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>