When installing (fastcgi mode), there is often such a command:
Copy Code code as follows:
/usr/local/webserver/php/bin/phpize
What is phpize for?
What is Phpize?
Phpize is used to expand the PHP extension module, through the phpize can build PHP plug-in module
For example, you want to be in the original compiled PHP to add memcached or ImageMagick extension modules, you can use Phpize, through the following steps to work.
Second, how to use Phpize?
When PHP is compiled, PHP's Bin directory will have phpize this script file. Before compiling the extension module you want to add, perform the following phpize.
For example, now you want to add a memcache extension module to PHP: All we have to do is follow these steps
Copy Code code 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 the path to the Php-config file can be specified after/configure.
So the compilation is done, and what you need to do is add the extension value to the php.ini file.
Copy Code code as follows:
Extension = "memcache.so"
Note: Cannot find CONFIG.M4.
This error is a very silly mistake, after decompression need CD to folder, or Phpize will be an error
Dynamically compiling PHP's memcache extension library, an error occurred while executing/usr/localphp/bin/phpize
Copy Code code as follows:
Cannot find autoconf. Please check your autoconf installation and the $PHP _autoconf environment variable are set correctly and then rerun this SC Ript.
Obviously the file is missing and needs to be installed.
Copy Code code 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 perform 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