Control Web Panel
WebPanel => PHP => Topic started by: oleteacher on February 03, 2022, 10:33:32 PM
-
As the subject states I see PHP-FPM running in Top 5 Resources and driving CPU usage up. I do not have PHP-FPM installed.
Did install PHP-FPM at one time but deleted using the button shown with version installed in PHP-FPM Selector.
Thing is, I will see two processes popup and they using 7% of CPU each. They do drop down in processes, but why are they still there if I removed PHP-FPM completely?
I did some searching here in forum, but I'm not finding a good topic to help me understand. Thanks in advance for input.
-
php-fpm gets installed here:
ls /opt/alt
Run the command above to confirm if there is any php-fpm still installed
-
Thank you for reply @iraqiboy90
I see this after running ls /opt/alt
php74 php81
That is what I have installed.
This is screencap example: https://i.imgur.com/yMsYqJ0.png
-
Thank you for reply @iraqiboy90
I see this after running ls /opt/alt
php74 php81
That is what I have installed.
This is screencap example: https://i.imgur.com/yMsYqJ0.png
Delete these folders if you like, at your own risk. Maybe a site is using one of them.
-
Delete these folders if you like, at your own risk. Maybe a site is using one of them.
Not sure that would be good. I only have 3 sites as this is new install of CWP. PHPInfo from one site shows this:
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /opt/alt/php81/usr/php
Loaded Configuration File /opt/alt/php81/usr/php/php.ini
I only have PHP CGI installed and they show to be in /opt/alt/ directory?
-
Sorry, I may have misunderstood your previous comment.
php74 php81
That is what I have installed.
yes, you have php cgi in /opt/alt. They are named php74 and php81 for you. PHP-FPM74 for example would be a folder named php-fpm74.
So, now we are back to square one.
If you have root access, login with SSH then install htop if it's not installed.
yum install htop
Run htop then press F4 to filter by word. Write "fpm" and it will show you processes with the name fpm in it. Take a look on the far right and you will see the path of where it is.
Here's an example:
(https://i.gyazo.com/1de4877b629643abdc6a31f403a40439.png)
Notice that CWP panel uses php-fpm 7.2.30 located in this path /usr/local/cwp/php71. DO NOT DELETE IT.
-
Sorry, I may have misunderstood your previous comment.
Run htop then press F4 to filter by word. Write "fpm" and it will show you processes with the name fpm in it. Take a look on the far right and you will see the path of where it is.
Here's an example:
(https://i.gyazo.com/1de4877b629643abdc6a31f403a40439.png)
Notice that CWP panel uses php-fpm 7.2.30 located in this path /usr/local/cwp/php71. DO NOT DELETE IT.
Maybe I am chasing a ghost :)
Installed/ran htop:
(https://i.imgur.com/bGk6bVA.png)
I did not know CWP used php-fpm. So, you have taught me something good! Never paid attention and assumed it ran on fastcgi.
The php-fpm processes are standard since CWP uses?
Now I ask your opinion. Is php-fpm a better choice over php cgi?
Thank you for your help and lesson.
-
You're welcome.
I'm not an expert, but from the small research I've done, php-fpm has more features, is faster, and is more secure than CGI, only downside is it uses more memory. Don't take my word for it. Here's a good article explaining the difference:
https://chriswiegman.com/2011/10/fastcgi-vs-suphp-vs-cgi-vs-mod_php-dso/
I believe the main php (php version switcher menu) on CWP is suPHP.
For security, I wouldn't advice in using CGI unless you can lock down those features that can become a security issue, but PHP CGI on CWP can be applied to specific folders instead of an entire domain which is a cool thing to have for those users/clients who have complicated websites...