我已经为php安装了libmemcached和memcached pecl扩展,但由于某种原因,它没有正确安装?我在/usr/lib64/php/中有具有正确权限的memcached.so,在/usr/local/lib/中有libmemcache.so
一切似乎都正确构建,没有错误,我重新启动了apache?
我还安装了守护进程。
我以前以某种方式轻松地为php安装了Memcache类,但我意识到我需要的是Memcached (注意d)类。如果需要更多信息,请让我知道!
编辑:我之前在php中使用了memcache (没有d),所以我知道我操作的是正确的php.ini!
编辑2:确实存在apache错误!
Unable to load dynamic library '/usr/lib64/php/modules/memcached.so' - /usr/lib64/php/modules/memcached.so: undefined symbol: php_json_encode in Unknown on line 0发布于 2011-07-14 03:49:02
我已经用yum安装程序而不是pecl install memcached在centos5中解决了这个问题
这样--> yum install php-pecl-memcached
然后,服务httpd重新启动,并显示在phpinfo()中
发布于 2011-09-15 14:59:17
几天前我也遇到过类似的错误。安装新版本(2.0)的memcached对我很有帮助。
yum -y install gcc-c++
wget http://launchpad.net/libmemcached/1.0/0.50/+download/libmemcached-0.50.tar.gz
tar xzf libmemcached-0.50.tar.gz
cd libmemcached-0.50
./configure
make
make install
wget http://pecl.php.net/get/memcached-2.0.0b2.tgz
pecl install memcached-2.0.0b2.tgz
echo 'extension=memcached.so' > /etc/php.d/memcached.ini
service php-fpm restart
cd ..
rm -r libmemcached-0.50*
rm -r memcached-发布于 2020-05-03 09:14:53
我不知道这是不是同样的问题,但经过几个小时的努力,我设法在CentOS上使用下面的命令正确地安装了PHP和Memcached:
yum --enablerepo=remi-php73 install php-memcached测试安装:
php -i | grep -i memcache应该显示如下内容:
/etc/php.d/50-memcached.ini
memcached
memcached support => enabled
libmemcached version => 1.0.18
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.compression_type => fastlz => fastlz
memcached.default_binary_protocol => Off => Off
memcached.default_connect_timeout => 0 => 0
memcached.default_consistent_hash => Off => Off
memcached.serializer => igbinary => igbinary
memcached.sess_binary_protocol => On => On
memcached.sess_connect_timeout => 0 => 0
memcached.sess_consistent_hash => On => On
memcached.sess_consistent_hash_type => ketama => ketama
memcached.sess_lock_expire => 0 => 0
memcached.sess_lock_max_wait => not set => not set
memcached.sess_lock_retries => 5 => 5
memcached.sess_lock_wait => not set => not set
memcached.sess_lock_wait_max => 150 => 150
memcached.sess_lock_wait_min => 150 => 150
memcached.sess_locking => On => On
memcached.sess_number_of_replicas => 0 => 0
memcached.sess_persistent => Off => Off
memcached.sess_prefix => memc.sess.key. => memc.sess.key.
memcached.sess_randomize_replica_read => Off => Off
memcached.sess_remove_failed_servers => Off => Off
memcached.sess_sasl_password => no value => no value
memcached.sess_sasl_username => no value => no value
memcached.sess_server_failure_limit => 0 => 0
memcached.store_retry_count => 2 => 2
Registered save handlers => files user memcachedhttps://stackoverflow.com/questions/5009450
复制相似问题