How to install php extension under linux
This article mainly introduces "how to install php extension under linux". In daily operation, I believe many people have doubts about how to install php extension under linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "how to install php extension under linux". Next, please follow the editor to study!
Experimental environment: centos 6.6x86x64
LAMP environment has been built: php version 5.6.8, apache version 2.4.12
1. Before installing memcached, you need to install libevent support:
# wget http://syslab.comsenz.com/downloads/linux/libevent-1.4.12-stable.tar.gz# tar zxvf libevent-1.4.12-stable.tar.gz # cd libevent-1.4.12-stable#./configure-- prefix=/usr/local/libevent#make & & make install
2. Compilation and installation of server-side memcached
# wget http://syslab.comsenz.com/downloads/linux/memcached-1.4.5.tar.gz# tar zxvf memcached-1.4.5.tar.gz # cd memcached-1.4.5#. / configure-- prefix=/usr/local/memcached-- with-libevent=/usr/local/libevent/# make & & make install
3. Steps for client to install memcache:
# wget http://www.lishiming.net/data/attachment/forum/memcache-2.2.3.tgz# tar zxvf memcache-2.2.3.tgz# cd memcache-2.2.3# / usr/local/php/bin/phpize#. / configure-with-php-config=/usr/local/php/bin/php-config-enable-memcache# make
The error after executing make is as follows:
/ usr/local/src/memcache-2.2.3/memcache.c: in function 'php_mmc_connect': / usr/local/src/memcache-2.2.3/memcache.c:1902: error: too few arguments supplied to function' zend_list_insert' / usr/local/src/memcache-2.2.3/memcache.c:1919: error: too few arguments supplied to function 'zend_list_insert' / usr/local / src/memcache-2.2.3/memcache.c: in function 'zif_memcache_add_server': / usr/local/src/memcache-2.2.3/memcache.c:1975: error: too few arguments supplied to function' zend_is_callable' / usr/local/src/memcache-2.2.3/memcache.c:2003: error: too few arguments supplied to function 'zend_list_insert' / usr/local/src / memcache-2.2.3/memcache.c: in function 'zif_memcache_set_server_params': / usr/local/src/memcache-2.2.3/memcache.c:2059: error: too few arguments supplied to function' zend_is_callable' / usr/local/src/memcache-2.2.3/memcache.c: in function 'mmc_find_persistent': / usr/local/src/memcache-2.2.3/memcache .C: 2159: error: too few arguments supplied to function 'zend_list_insert' / usr/local/src/memcache-2.2.3/memcache.c:2177: error: too few arguments supplied to function' zend_list_insert' make: * * [memcache.lo] error 1
Modify according to the error:
Vi memcache.c
Put all: zend_list_insert (pool, le_memcache_pool); http://www.bbqmw.net/qm_bbqmbd/
Change to: zend_list_insert (pool, le_memcache_pool TSRMLS_CC)
Put all: zend_list_insert (mmc, le_pmemcache)
Change to: zend_list_insert (mmc, le_pmemcache TSRMLS_CC)
Talk about all: if (! zend_is_callable (failure_callback, 0, NULL))
Change to: if (! zend_is_callable (failure_callback, 0, NULL, NULL))
After the modification is completed, re-compile the make
At this point, the study on "how to install php extensions under linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!