Php sockets extension installation Configuration

Source: Internet
Author: User

This article will give you a detailed description of the php sockets extension installation configuration. I hope this method will be helpful to you.

After installing cacti today, I found that php sockets extensions are required, but lnmp is not installed now, so I thought of phpzie tool to install extensions. The installation method is as follows:

Enable sockets extension in linux

The Code is as follows: Copy code

1. cd php-5.3.8/ext/sockets/
2./usr/local/php/bin/phpize
3../configure -- enable-sockets -- with-php-config =/usr/local/php/bin/php-config
4. make
5. make install

Then add the loading extension code in/etc/php. ini:

The Code is as follows: Copy code

1. extension = sockets. so
Service php-fpm reload or service httpd reload

Enable sockets extension in windows

If you do not open the file, edit your php. ini file and remove the comments in the following line:
Extension = php_sockets.dll
If you cannot remove the annotation, use the following code to load the extension Library:

The Code is as follows: Copy code
<? Php
If (! Extension_loaded ('buckets '))
{
If (strtoupper (substr (PHP_ OS, 3) = "WIN ")
{
Dl ('php _ sockets. dll ');
}
Else
{
Dl ('ets ETS. so ');
}
}
?>

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.