Add the php sockets module in wdlinux

Source: Internet
Author: User
I have handled the problem twice before adding the php sockets module in wdlinux, but I have never had time to make a record. When developing a QQ space application, you need to use socket, so an error undefinedfunctionsocket_create () will be reported. okay, start to install the module. System... Add the php sockets module in wdlinux
This problem has been handled twice before, but there is no time to make a record.
When developing a QQ space application, a socket is required, so an error is reported.

Undefined function socket_create (); okay, start to install the module.
The system is centos6.3 64-bit
The command for obtaining the wdlinux installation package is as follows:

Wget http://dl.wdlinux.cn: 5180/lanmp_laster.tar.gz unzip

Tar-zxvf lanmp_laster.tar.gz go to the directory cd lanmp_laster and check that there are two php-related packages.
Continue to decompress
Tar-zxvf php-5.2.17.tar.gz in Directory

Cd php-5.2.17 into extended directory cd ext
View the sockets Directory
Copy it to the following Directory:

Cp-r sockets // www/wdlinux/apache_php-5.2.17/include/php/ext/enter the Directory

Cd/www/wdlinux/apache_php-5.2.17/include/php/ext/sockets start compilation

/Www/wdlinux/php/bin/phpize./configure -- enable-sockets -- with-php-config =/www/wdlinux/php/bin/php-configmakemake install modify the configuration file

Vim/www/wdlinux/etc/php. ini adds two lines at the end.

Extension_dir =/www/wdlinux/apache_php-5.2.17/lib/php/extensions/no-debug-non-zts-20060613/extension = sockets. so restart the service

Service httpd restart check whether the extension is successfully installed

/Www/wdlinux/php/bin/php-m ends here.
 
This document is excerpted from wdlinux http://www.wdlinux.cn/. for more information, see!
Related Article

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.