Home > Backend Development > PHP Tutorial > How to use phpize in php tutorial_PHP tutorial

How to use phpize in php tutorial_PHP tutorial

WBOY
Release: 2016-07-13 10:39:03
Original
975 people have browsed it

When installing (fastcgi mode), there is often a command like this:

Copy the code The code is as follows:

/ usr/local/webserver/php/bin/phpize

1. What does phpize do?

What is phpize?
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 original compiled php, you can use phpize and follow the following steps. Work.

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: all we have to do is the following steps

Copy code The code is as follows:

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 after ./configure, you can specify the path to the php-config file
In this way, the compilation is completed. What you still need to do is to add the extension value to the php.ini file

Copy code The code is as follows:

extension = “memcache.so”

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
Dynamically compile PHP's memcache extension library, and an error occurred when executing /usr/localphp/bin/phpize,
Copy code The code is as follows:

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.

Copy code The code is as follows:

# 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/733407.htmlTechArticleWhen installing (fastcgi mode), there is often such a command: Copy the code as follows: /usr/local/ webserver/php/bin/phpize 1. What does phpize do? What is phpize? ph...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template