PHP has many extensions, and we didn't have some extensions installed at the time of the initial installation, and we might need to use these extensions in the process. PHP provides a phpize tool for us to install the required extensions.
The following is an installation of the socket extension to introduce the use of phpize
1. Find your own PHP installation directory, such as my directory is/usr/local/php, in the directory, find Bin/phpize. If you do not have this tool, you do not have the tool installed, so you will need to install Php.dev, which is generally available.
2. To expand, you need to have a PHP version of the same as the currently installed PHP source package, the current version of PHP can be used phpinfo () view. It is the phpinfo.php that looks at the success of the installation after the initial installation. If not, go here to download the corresponding source code package: http://www.php.net/releases/
3. Open the source package directory, into the EXT directory, for example, I entered:/usr/local/php-5.2.17/ext, ext under the various PHP with the expansion module, into the ext/sockets.
# cd/usr/local/php-5.2.17/ext/sockets/
4. Execute the Phpize tool, after execution, you can see the corresponding configure file generated in the directory
#/usr/local/php/bin/phpize
5. You can now configure by configure to execute the following command:
./configure--prefix=/usr/local/php--with-php-config=/usr/local/php/bin/php-config--enable-sockets
Make && make install
After execution, you can see the following output:
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613
The first is the build directory of the extension module, where you can see the corresponding sockets.so file
6. Change the php.ini and add the following statement:
extension= "/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/sockets.so"
7. Restart Apache to see if the phpinfo.php page is properly loaded sockets expansion
# Service httpd Restart
http://ipeng.blog.163.com/blog/static/27836929201303022612539/