Php tutorial-how to use phpize
Phpize is used to expand the php extension module. phpize can be used to establish a php plug-in module. The following describes how to use phpize. For more information, see
When installing (fastcgi mode), you often have the following command:
The Code is as follows:
/Usr/local/webserver/php/bin/phpize
I. What does phpize do?
What is phpize?
Phpize is used to expand the php extension module. phpize can be used to establish a php plug-in module.
For example, if you want to add memcached, ImageMagick, and other extension modules to the compiled php, you can use phpize to perform the following steps.
Ii. How to Use phpize?
After php compilation is complete, the php bin directory contains the phpize script file. Run the following phpize command before compiling the extension module you want to add;
For example, if you want to add the memcache extension module to php, do the following:
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: the path of the php-config file can be specified after./configure.
In this way, the compilation is complete. You also need to add the extension value to the php. ini file.
The Code is as follows:
Extension = "memcache. so"
Note: Cannot find config. m4.
This error is a silly one. After decompression, You Need To cd to the folder. Otherwise, phpize will report an error.
The memcache extension library of PHP is dynamically compiled. An error occurs when/usr/localphp/bin/phpize is executed,
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, files are missing and need to be installed.
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 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 install
Run 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