PHP Tutorial phpize How to use _php tutorial

Source: Internet
Author: User
When installing (fastcgi mode), there are often such commands:
Copy CodeThe code is as follows:
/usr/local/webserver/php/bin/phpize

What does Phpize do?

What is Phpize?
Phpize is used to extend the PHP extension module, through the phpize can build PHP plug-in module
For example, if you want to add extensions such as memcached or ImageMagick in the original compiled PHP, you can use Phpize to work through the following steps.

Second, how to use Phpize?

When PHP is compiled, the phpize script file will be available in the bin directory of PHP. Before compiling the extension module you want to add, execute the following phpize.
For example, now you want to add the memcache extension module to PHP: We're just going to do the following steps.
Copy the 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./configure can be specified after the path to the Php-config file
so that the compilation is complete, but also to do is to add the extension value in the php.ini file
copy code code as follows:
Extension =" memcache.so "

Note: Cannot find Config.m4.
This error is a silly mistake, the decompression will require CD to the folder, or Phpize will error
dynamically compiled PHP memcache extension Library, in the execution of/usr/localphp/bin/phpize error occurred,
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. The

is obviously missing files and needs to be installed.

Copy the 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 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

http://www.bkjia.com/PHPjc/733407.html www.bkjia.com true http://www.bkjia.com/PHPjc/733407.html techarticle installation (fastcgi mode), there are often such a command: Copy the code is as follows:/usr/local/webserver/php/bin/phpize One, Phpize is why? What is Phpize? ph ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.