Board logo

标题: [求助] 置顶升级的PHP5.3.17 memcache失效 [打印本页]

作者: cfooxl    时间: 2013-12-4 16:50     标题: 置顶升级的PHP5.3.17 memcache失效

本帖最后由 cfooxl 于 2013-12-4 16:52 编辑

验证如下...探针http://23.227.177.140/tz.php?act=phpinfo


# /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



照着论坛里搜索的方法,编辑了原来memcache的sh文件
#!/bin/bash
# Memcache install scripts
# Author:wdlinux
# Url http://www.wdlinux.cn


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 http://www.wdlinux.cn/conf/init.d/init.memcached-ubuntu -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 http://www.wdlinux.cn/conf/init.d/init.memcached -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




TAT 求助。。。。。。。。完全不知道该怎么办了..........我是不是要写死5.3.17这个安装目录?
作者: cfooxl    时间: 2013-12-4 17:42

本帖最后由 cfooxl 于 2013-12-4 18:04 编辑

=.= 老大的服务器里什么版本都有,直接修改置顶PHP升级文件里的ver为5.3.27 这是memcached安装文件里的另外一个版本选择
5.2.17和5.3.27我直接升级5.3.27 然后再安装一次memcached。。。。。。。。。。。笨人有笨办法。。。。。。。。。
作者: cfooxl    时间: 2013-12-4 18:57

升级成功!
phpinfo可查

探针在一楼
作者: admin    时间: 2013-12-5 09:00

解决了就好




欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/) Powered by Discuz! 7.2