PHP Sockets Extended Installation Configuration detailed _php tutorial

Source: Internet
Author: User
This article to give you a detailed introduction of the PHP Sockets extension installation configuration in detail, I hope this method is helpful to you classmates.

Today installation cacti discovery requires PHP sockets extension, and now the LNMP is not installed, so think of the Phpzie tool installation extension, the installation method is as follows:

Open sockets extensions 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 load extension code to the/etc/php.ini:

The code is as follows Copy Code

1.extension=sockets.so
Service PHP-FPM Reload or service httpd reload

Open sockets extensions under Windows

If you do not open it, please edit your php.ini file and remove the previous comment from the following line:
Extension=php_sockets.dll
If you cannot remove the comment, use the following code to load the extension library:

The code is as follows Copy Code
if (!extension_loaded (' Sockets '))
{
if (Strtoupper (substr (Php_os, 3)) = = = "WIN")
{
DL (' Php_sockets.dll ');
}
Else
{
DL (' sockets.so ');
}
}
?>

http://www.bkjia.com/PHPjc/629816.html www.bkjia.com true http://www.bkjia.com/PHPjc/629816.html techarticle This article to give you a detailed introduction of the PHP Sockets extension installation configuration in detail, I hope this method is helpful to you classmates. Today installing cacti Discovery requires PHP sockets extension, and now the ...

  • 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.