Recently, a monitoring interface has been written for the South base platform, with a BS framework, which has a capability to monitor virtual machines for downtime.
The process is: The monitor makes an access request--an interface analysis request--starts the socket to detect if the target virtual machine is down.
Because of the ICMP protocol detection, the SOCK_RAW socket type is used.
Server using Apache + PHP + MySQL, found that the program error, prompted that there is no permission to create a socket. Later, the resource learned that such sockets require root access or CGI to run PHP combined with setuid () to create a socket.
Workaround: Use Nginx+php-cgi+mysql to resolve.
When compiling PHP, the following modifications are required to start the service with the root user.
1. Find PHP Source code $src_path/sapi/cgi/fpm/fpm_unix.c (the version is not the same, preferably through find $src _path-name fpm_unix.c)
2. Add a macro definition at the top of the file: #define I_really_want_root_php
3. Re-configure make make install
4.php-fpm.conf change user, group to root
Author: Penguim
http://www.bkjia.com/PHPjc/478048.html www.bkjia.com true http://www.bkjia.com/PHPjc/478048.html techarticle recently, a monitoring interface has been written for the South base platform, with a BS framework, which has a capability to monitor virtual machines for downtime. The process is: the monitoring machine makes the access request--Interface analysis Request ...