Home  >  Article  >  Backend Development  >  In-depth understanding of phpize_PHP tutorial

In-depth understanding of phpize_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:09:21751browse

When installing (fastcgi mode), there is often such a command: /usr/local/webserver/php/bin/phpize
1. What is phpize?
What is phpize? PHP official description:
http://php.net/manual/en/install.pecl.phpize.php
phpize is used to extend PHP extension modules. PHP plug-in modules can be established through phpize
For example, if you want to add extension modules such as memcached or ImageMagick to the originally compiled PHP, you can use phpize and work through the following steps.
2. How to use phpize?
When php is compiled, there will be a phpize script file in the bin directory of php. Before compiling the extension module you want to add, just execute the following phpize;
For example, if you want to add the memcache extension module to php now: all we have to do is the following steps
———————— ————————————————
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5/
/usr/local/webserver/php/ bin/phpize
./configure –with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
———————— ————————————————
Note that ./configure can be specified later with the path to the php-config file
like this The compilation is complete. All you need to do is add the extension value
extension = "memcache.so"
------------------ to the php.ini file. ---------------------------------------
Note: Cannot find config.m4.
This error is a very silly one. You need to cd to the folder after decompression, otherwise phpize will report an error

Dynamic compilation of PHP's memcache extension library, an error occurred when executing /usr/localphp/bin/phpize,
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script.
Obviously the files are missing and need to be installed. I searched for information online.
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# tar -zvxf m4-1.4.9.tar.gz
# cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/ autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install
Then execute the following command to install
#/usr/local/php/bin/phpize
#./configure –prefix=/usr/local/memcached –with-libevent=/usr/local/libevent –with -php-config=/usr/local/php/bin/php-config
#make && make install

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327293.htmlTechArticleWhen installing (fastcgi mode), there is often such a command: /usr/local/webserver/php/bin /phpize 1. What does phpize do? What is phpize? PHP official description:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn