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