It's just a php7. I'm a new/usr/local/php7.
I put/etc/init.d/php-fpm stop
Then turn on/ETC/INIT.D/PHP7-FPM start
I'm OK. I create a new site directly to the 502 error feeling Nginx By default is looking for php-fpm and I have stopped php-fpm.
Don't know why did switch there's no friends know Thank you
Reply content:
It's just a php7. I'm a new/usr/local/php7.
I put/etc/init.d/php-fpm stop
Then turn on/ETC/INIT.D/PHP7-FPM start
I'm OK. I create a new site directly to the 502 error feeling Nginx By default is looking for php-fpm and I have stopped php-fpm.
Don't know why did switch there's no friends know Thank you
Because Nginx is the default listener is the 127.0.0.1:9000 port, the default 9000 port has been occupied by the previous PHP, please follow the following steps to configure:
1.cd/usr/local/php7/etc/php-fpm.d/www.conf, find listen 127.0.0.1:9000, and then change the 9000 to custom, I myself modified to 9001, and then save the exit
2.cd/usr/local/nginx/conf/nginx.conf, find Fastcgi_pass this line, modified as: Fastcgi_pass 127.0.0.1:9001;
3. Turn off the low version of PHP-FPM/ETC/INIT.D/PHP-FPM stop
4. Turn on PHP7 php-fpm/etc/init.d/php7-fpm start
5. Restart Nginx Service Nginx restart
I'm done here and I hope to help you! With the PHP7 Phpinfo interface, let's get a glimpse
1. Set different port numbers for different php-fpm, with address port number as parameter at Fastcgi_pass
2.fastcgi_pass directly with the socket connection, just change the path
1:
Download Address: http://php.net/archive/2015.php#id2015-01-11-6
2:
./configure--PREFIX=/USR/LOCAL/PHP7--with-config-file-path=/usr/local/php7/etc--ENABLE-FPM-- With-fpm-user=www--with-fpm-group=www--with-mysqli--with-pdo-mysql--with-iconv-dir--with-freetype-dir-- With-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir=/usr--enable-xml--disable-rpath--enable-bcmath-- Enable-shmop--enable-sysvsem--enable-inline-optimization--with-curl--enable-mbregex--enable-mbstring-- With-mcrypt--enable-ftp--with-gd--enable-gd-native-ttf--with-openssl--with-mhash--enable-pcntl--enable-sockets --with-xmlrpc--enable-zip--enable-soap--without-pear--with-gettext--disable-fileinfo--enable-maintainer-zts
3:
make zend_extra_libs= '-liconv ' && make install
4:
CP Php.ini-production/usr/local/php7/etc/php.ini
CP SAPI/FPM/INIT.D.PHP-FPM/ETC/INIT.D/PHP7-FPM
chmod +x/etc/init.d/php7-fpm
Cp/usr/local/php7/etc/php-fpm.conf.default/usr/local/php7/etc/php-fpm.conf
Cp/usr/local/php7/etc/php-fpm.d/www.conf.default/usr/local/php7/etc/php-fpm.d/www.conf
5:
As I have previously had a 5.6 version of php-fpm.conf content as follows:
[Global]
PID =/usr/local/php/var/run/php-fpm.pid
Error_log =/usr/local/php/var/log/php-fpm.log
Log_level = Notice
[WWW]
Listen =/tmp/php-cgi.sock
Listen.backlog =-1
Listen.allowed_clients = 127.0.0.1
Listen.owner = www
Listen.group = www
Listen.mode = 0666
user = www
Group = www
PM = dynamic
Pm.max_children = 10
Pm.start_servers = 2
Pm.min_spare_servers = 1
Pm.max_spare_servers = 6
Request_terminate_timeout = 100
Request_slowlog_timeout = 0
Slowlog = Var/log/slow.log
I copied it directly into the/usr/local/php7/etc/and then modified the path of the blue section to PHP7.
6: Direct/etc/init.d/php-fpm stop and then/etc/init.d/php7-fpm start
You can switch it directly.
You can also change the php-fpm.conf port number of the way to run PHP7, but the internet says there is no sock file method of high efficiency.
PHP.ini Loading no problem? How did you set up the php.ini?