置顶升级的PHP5.3.17 memcache失效
[i=s] 本帖最后由 cfooxl 于 2013-12-4 16:52 编辑 [/i]验证如下...探针[url=http://23.227.177.140/tz.php?act=phpinfo]http://23.227.177.140/tz.php?act=phpinfo[/url]
[quote]# /www/wdlinux/php/bin/php -m |grep memcache
PHP Warning: PHP Startup: Unable to load dynamic library '/www/wdlinux/php/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll' - /www/wdlinux/php/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
[/quote]
照着论坛里搜索的方法,编辑了原来memcache的sh文件
[quote]#!/bin/bash
# Memcache install scripts
# Author:wdlinux
# Url [url=http://www.wdlinux.cn]http://www.wdlinux.cn[/url]
cd /tmp
wget -c https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
wget -c http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz
wget -c http://pecl.php.net/get/memcache-2.2.7.tgz
tar xf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr
make
[ $? != 0 ] && exit
make install
cd ..
tar xf memcached-1.4.15.tar.gz
cd memcached-1.4.15
./configure --prefix=/www/wdlinux/memcached --with-libevent=/usr
make
[ $? != 0 ] && exit
make install
cd ..
if grep -qi 'debian\|ubuntu' /etc/issue; then
wget [url=http://www.wdlinux.cn/conf/init.d/init.memcached-ubuntu]http://www.wdlinux.cn/conf/init.d/init.memcached-ubuntu[/url] -O /www/wdlinux/init.d/memcached
chmod 755 /www/wdlinux/init.d/memcached
ln -s /www/wdlinux/init.d/memcached /etc/init.d/memcached
update-rc.d -f memcached defaults
update-rc.d -f memcached enable 235
else
wget [url=http://www.wdlinux.cn/conf/init.d/init.memcached]http://www.wdlinux.cn/conf/init.d/init.memcached[/url] -O /www/wdlinux/init.d/memcached
chmod 755 /www/wdlinux/init.d/memcached
ln -s /www/wdlinux/init.d/memcached /etc/init.d/memcached
chkconfig --level 35 memcached on
fi
touch /www/wdlinux/etc/memcached.conf
service memcached start
###
tar zxvf memcache-2.2.7.tgz
cd memcache-2.2.7
/www/wdlinux/php/bin/phpize
./configure --enable-memcache --with-php-config=/www/wdlinux/php/bin/php-config --with-zlib-dir
make
[ $? != 0 ] && exit
make install
grep -q 'memcache.so' /www/wdlinux/etc/php.ini
if [ $? != 0 ]; then
echo "
[memcache]
extension_dir ="/www/wdlinux/php/lib/php/extensions/$ext_dir"
extension=memcache.so" >> /www/wdlinux/etc/php.ini
fi
if [ -d /www/wdlinux/apache ]; then
service httpd restart
else
service nginxd restart
fi
echo
echo "memcache install is OK"
echo[/quote]
TAT 求助。。。。。。。。完全不知道该怎么办了..........我是不是要写死5.3.17这个安装目录? [i=s] 本帖最后由 cfooxl 于 2013-12-4 18:04 编辑 [/i]
=.= 老大的服务器里什么版本都有,直接修改置顶PHP升级文件里的ver为5.3.27 这是memcached安装文件里的另外一个版本选择
5.2.17和5.3.27我直接升级5.3.27 然后再安装一次memcached。。。。。。。。。。。笨人有笨办法。。。。。。。。。 升级成功!
phpinfo可查
探针在一楼 解决了就好
页:
[1]