php 使用memcached 安装配置
1、安装libeven
memcached的使用需要libeven的支持,我们得先装上libeven。
官方网站:http://www.monkey.org/~provos/libevent/
libevent安装方式比较简单:
./configure && make
make install
检查是否 已经安装
ls -l /usr/local/lib/ | grep even
2、安装memcached
官方网站:http://www.danga.com/memcached/download.bml
memcached安装需要些参数:
以下是代码片段:
./configure
make
make install
3、测试
/usr/local/bin/memcached -h
正常ok
常见错误
/usr/local/bin/memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
解决办法
LD_DEBUG=libs memcached -v
输出
32179: find library=libevent-1.4.so.2 [0]; searching
32179: search cache=/etc/ld.so.cache
32179: search path=/lib/tls/i686/sse2:/lib/tls/i686:/lib/tls/sse2:/lib/tls:/lib/i686/sse2:/lib/i686:/lib/sse2:/lib:/usr/lib/tls/i686/sse2:/usr/lib/tls/i686:/usr/lib/tls/sse2:/usr/lib/tls:/usr/lib/i686/sse2:/usr/lib/i686:/usr/lib/sse2:/usr/lib(system search path)
32179: trying file=/lib/tls/i686/sse2/libevent-1.4.so.2
32179: trying file=/lib/tls/i686/libevent-1.4.so.2
32179: trying file=/lib/tls/sse2/libevent-1.4.so.2
32179: trying file=/lib/tls/libevent-1.4.so.2
32179: trying file=/lib/i686/sse2/libevent-1.4.so.2
32179: trying file=/lib/i686/libevent-1.4.so.2
32179: trying file=/lib/sse2/libevent-1.4.so.2
32179: &
相关文档:
如何创建我们的第一个PHP页面呢?非常简单的!选择我们使用的一个最好的设计工具,当然你也可以 只使用记事本。创建之后记得要保存为扩展名为PHP的文件,然后传到我们的服务器
上。
在编写PHP程序之前通常我们需要配置我们的环境,也就是说服务器
要支持PHP才能行啊
一、PHP的基本结构:
使用Incl ......
linux下apache+php安装常见问题 configure: error: Unable to find libgd.(a|so)
如果使用的是ubuntu或debian就很简单了,直接sudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd 就基本上搞定,但是用源代码安装还是很麻烦~
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0 ......
Ubuntu无疑是linux初学者的首选版本,因为它图形界面支持的非常好。
然而xammp是php初学者的首选。
1.什么是xammp?
XAMPP(Apache+MySQL+PHP+PERL)是一个功能强大的建站集成软件包。这个软件包原来的名字是LAMPP,但是为了避免误解,最新的几个版本就改名为 XAMPP 了。它可以在Windows、Linux、Solaris三种操作系统下安 ......
1、模板的由来
在没有模板技术之前,使用PHP开发程序,通常都是php代码和html混编在一起。比如说新闻列表,很可能就是一个newslist.php页面,结构如下:
<?
//从数据库中读取出要显示的新闻记录
?>
<html>
<head>……..
</head>
<body>
<?
While ($news ......