php ’ 目录归档

安装php memcached扩展支持

需要安装的插件

http://pecl.php.net/package/memcached

https://launchpad.net/libmemcached/+download

先安装libmemcached

./configure –prefix=/usr/local/libmemcached  –with-memcached
make && make install

如果遇到libmemcached编译报错请看
libmemcached 编译错误

阅读全文

libmemcached 编译错误 libmemcached/auto.cc: In function ‘memcached_return_t text_incr_decr(memcached_server_st*, bool, const char*, size_t, uint64_t, bool)’:

编译libmemcached1.0.6时出现
libmemcached/auto.cc: In function ‘memcached_return_t text_incr_decr(memcached_server_st*, bool, const char*, size_t, uint64_t, bool)’:
libmemcached/auto.cc:73: error: expected `)’ before ‘PRIu64’
是gcc版本过低,需要更新并且设置全局变量。

首先
yum install gcc44 gcc44-c++ libstdc++44-devel
export CC=/usr/bin/gcc44
export CXX=/usr/bin/g++44

然后重新编译即可

return top