Memcached not showing in phpinfo ()

I installed libmemcached and memcached extension for php and somehow installed it incorrectly? I have memcached.so in / usr / lib64 / php / with the correct permissions and libmemcache.so in / usr / local / lib /

Everything seemed to be built correctly without errors, and I restarted apache?

I also have a daemon installed.

I somehow easily got the Memcache class, which was easy to install for php before, but I realized what I want is the Memcached class (pay attention to d). let me know if you need more information!

EDIT: I previously had memcache (without d) running on php, so I know that I was manipulating the correct php.ini!

EDIT 2: there really was an apache error!

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
+3
source share
3 answers

centos5, yum, pecl install memcached

→ yum install php-pecl-memcached

httpd phpinfo()

+3

. (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-
0

add

extension=memcache.so

in php.ini then restart apache

0
source

Source: https://habr.com/ru/post/1792336/


All Articles