Php has many extension functions. Some extensions are not installed when we first install them. These extensions may be used during use. Php provides a phpize tool for us to install the required extensions. The following describes how to use phpize by installing socket extensions: 1. Find your php installation directory. For example, my directory is homevsran.
Php has many extension functions. Some extensions are not installed when we first install them. These extensions may be used during use. Php provides a phpize tool for us to install the required extensions. The following describes how to use phpize by installing socket extensions: 1. Find your php installation directory. For example, my directory is home/vsran.
Php has many extension functions. Some extensions are not installed when we first install them. These extensions may be used during use. Php provides a phpize tool for us to install the required extensions.
The following describes the use of phpize by installing socket extensions:
1. Find your php installation directory. For example, if my directory is home/vsrank/php, find bin/phpize. If you do not have this tool, it indicates that the tool is not installed. You need to install php. dev, which is usually available.
2. for extension, you need a php source package that is the same as that of the currently installed php version. You can use phpinfo () to view the current php version. It is the test. php that checks whether the installation is successful after the first installation.
3. open source package directory, enter the ext directory, for example, I will enter:/home/vsrank/php-5.3.10/ext, ext under each php with the extension module, go to ext/sockets.
4. After cd to ext/sockets, run the following command:
/home/vsrank/php/bin/phpize
Execute the phpize tool. After execution, the corresponding configure file is generated under the directory:
5. Now you can configure it through configure and execute the following command:
./configure --enable-sockets --with-php-config=/home/vsrank/php/bin/php-configmakemake install
After execution, the following output is displayed:
Installing shared extensions: /home/vsrank/php/lib/php/extensions/no-debug-non-zts-20090626/Installing header files: /home/vsrank/php/include/php/
The first is the directory generated by the extension module. You can see the corresponding sockets. so file under the corresponding directory.
6. Change php. ini and add the following statement:
extension="/home/vsrank/php/lib/php/extensions/no-debug-non-zts-20090626/sockets.so"
We can see that it is consistent with the above output.
7. Restart Apache and check whether your socket is configured ..
References:
What is phpize? Http://www.itokit.com/2012/0501/73714.html
Http://blog.chinaunix.net/uid-405749-id-28319.html
Http://topic.csdn.net/u/20100426/16/3dc3ca94-43b9-49a5-b509-43b56802f8e1.html? Seed = 1620302575 & r = 78631411 # r_78631411
Thank you for sharing your ideas !! I also hope this article can help other friends.
Note: during the first installation of the extension, the following error occurs during make:
Sockets. lo is not a valid libtool ....
The cause is unknown. Solution: Delete the source package, decompress the package again, and redo it all. Solution to the Problem... brute force .....