Author Topic: PHP7.1/7.2 where is the php-fpm server?  (Read 23418 times)

0 Members and 1 Guest are viewing this topic.

PHP7.1/7.2 where is the php-fpm server?
« on: February 10, 2018, 05:46:37 AM »
CentOS Linux  7.4.1708 (Core)
Kernel 3.10.0-693.17.1.el7.x86_64
Apache & Varnish Cache & Nginx Reverse Proxy
Apache/2.4.29
nginx/1.12.2
PHP 7.1.9
suPHP version 0.7.2
MySQL version: 10.1.31-MariaDB
CWPpro 0.9.8.454
SEL disabled
Mod Security disabled

The php-fpm server is supposed to be running and listening on tcp_port 9000 as php upstream handler/proxy.
Code: [Select]
upstream php-handler {
  server 127.0.0.1:9000;
}

Checked with Netstat Port Usage but there is no process listening on that port nor is there any process named php-fpm. It should also be listed as server enabled/disabled but is neither.
Trying to enable/start with
Code: [Select]
systemctl enable (or start)[/i] php71-php-fpm (or php72-php-fpm)
fails with
Quote
Failed to execute operation: No such file or directory

Yum can only install php-fmp v 5.4.16, which does not work with PHP7 and is even producing adverse effects, hence no option

And I am starting to wonder why for any other component with a server attached to it there is a notice but not for php-fpm, suspecting that php-fpm is absent from the switch script



If wrong then please how to start the php-fpm server else appreciate to know how to install the server that CWP might have failed to install in the first place.

Re: PHP7.1/7.2 where is the php-fpm server?
« Reply #1 on: February 10, 2018, 11:33:25 AM »
Just to make the litmus test
Code: [Select]
yum -y install yum-plugin-priorities
yum -y install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/remi-safe.repo
yum --enablerepo=remi-safe -y install php71-php-fpm

Quote
Installed:
  php71-php-fpm.x86_64 0:7.1.14-1.el7.remi

Dependency Installed:
  environment-modules.x86_64 0:3.2.10-10.el7          php71-php-common.x86_64 0:7.1.14-1.el7.remi
  php71-php-json.x86_64 0:7.1.14-1.el7.remi           php71-runtime.x86_64 0:1.0-1.el7.remi
  scl-utils.x86_64 0:20130529-18.el7_4

Code: [Select]
systemctl enable php71-php-fpm
Quote
Created symlink from /etc/systemd/system/multi-user.target.wants/php71-php-fpm.service to /usr/lib/systemd/system/php71-php-fpm.service.
Code: [Select]
service php71-php-fpm start
service php71-php-fpm status
Quote
Redirecting to /bin/systemctl status php71-php-fpm.service
● php71-php-fpm.service - The PHP FastCGI Process Manager
   Loaded: loaded (/usr/lib/systemd/system/php71-php-fpm.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2018-02-10 11:17:59 GMT; 4min 52s ago
 Main PID: 60379 (php-fpm)
   Status: "Processes active: 0, idle: 6, Requests: 3, slow: 0, Traffic: 0req/sec"
   CGroup: /system.slice/php71-php-fpm.service
           ├─60379 php-fpm: master process (/etc/opt/remi/php71/php-fpm.conf)
           ├─60380 php-fpm: pool www
           ├─60381 php-fpm: pool www
           ├─60382 php-fpm: pool www
           ├─60383 php-fpm: pool www
           ├─60384 php-fpm: pool www
           └─60535 php-fpm: pool www

Feb 10 11:17:59 server.my.domain systemd[1]: Starting The PHP FastCGI Process Manager...
Feb 10 11:17:59 server.my.domain systemd[1]: Started The PHP FastCGI Process Manager.

Logically it shows up in the startup_services section of the panel


« Last Edit: February 10, 2018, 12:32:22 PM by n8v8r »

Re: PHP7.1/7.2 where is the php-fpm server?
« Reply #2 on: February 10, 2018, 12:30:30 PM »
listed as bug http://forum.centos-webpanel.com/centos-webpanel-bugs/php-switcher-fails-to-install-phpvx-php-fpm-and-dependencies/

also cross referencing http://forum.centos-webpanel.com/suggestions/add-cwpsrv-and-php-fpm-to-services-status-of-root-panel/ and http://forum.centos-webpanel.com/php/php-version-vs-php-fpm-version/

questions
1 why does the switch script does not install phpvX-php-fpm and dependencies?
2  phpvX- compiled/installed by CWP resides in /opt/alt/ whilst phpvX-php-fpm installed with yum from the remi-safe repo resides in /opt/remi/
Will both installations recognize each other and work seamlessly together or is there potential for confusion/panic/conflict?
3 what happens if CWP eventually gets around fixing the bug and installing another phpvX-php-fpm in /opt/alt/? Is the switch script safeguarding against conflicts and actually checks the presence of services already installed, either not installing a duplicate or removing the existing service and replacing it with the CWP installation?
4 why not including the remi-safe repo in the first place and making things easier for all around?

« Last Edit: February 10, 2018, 12:48:40 PM by n8v8r »

Re: PHP7.1/7.2 where is the php-fpm server?
« Reply #3 on: February 11, 2018, 04:28:27 PM »
There are 4 php.ini files now
Quote
./home/user/public_html/php.ini
./etc/opt/remi/php71/php.ini
./opt/alt/php71/usr/php/php.ini
./usr/local/php/php.ini

Which one takes precedence over which one?
Suppose this is the baseline?
Quote
./usr/local/php/php.ini
Then one level up
Quote
./etc/opt/remi/php71/php.ini and/or ./opt/alt/php71/usr/php/php.ini
But which one of those 2?

Then one level up?
Quote
./home/user/public_html/php.ini

Re: PHP7.1/7.2 where is the php-fpm server?
« Reply #4 on: February 12, 2018, 03:42:00 AM »
2  phpvX- compiled/installed by CWP resides in /opt/alt/ whilst phpvX-php-fpm installed with yum from the remi-safe repo resides in /opt/remi/
Will both installations recognize each other and work seamlessly together or is there potential for confusion/panic/conflict?
The two installation are not playing along. One is not recognizing the php-modules (e.g. php-pdo) installed utilized by the other. Could be the difference in version - CWP installed PHP7.19 and Remi-safe installed PHP7.14

What a fine mess this is  >:( :( :'(

Any bright ideas of how to get CWP to install the phpvX-php-fpm server module, now that I had to remove remiPHP7.1.4?

Offline
*
Re: PHP7.1/7.2 where is the php-fpm server?
« Reply #5 on: July 12, 2019, 10:45:34 PM »
yum remove php71-php-fpm (to remove remi php-fpm)

I wonder, why after 1 year problem is still actuall..

If you have cwp pro and installed from webservices it is installed as cwp-phpfpm
At actual version it install but still not work...