Can't seem to switch php handler to fcgi.

Operating System & Version
Centos 7.9.2009
cPanel & WHM Version
106.0.11

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
So we wanted to make use of httpd and stop using mod_ruid and instead remove php 7.3 and use mpm_event instead of prefork.
Also we wanted to use Fastcgi (not fcgid) as php handler.

To do this we configured easyapache accordingly.

Still when I go to the Multi PHP manager I only have the choice between cgi and none.

If I remember, there was something in the log which I clicked away too fast. Something about 2 workers were present which was not possible, event and prefork (while that one I had disabled) and event was stopped.
Also httpd2 could not be found.

I presume there is a log, but I don't know where that is. How can we fix it so we can choose fcgi from the php handler menu?

Also, at this time we got so many saved profiles, we would like to clean them up so the oversight gets a bit more clear. However it seems we can't delete any easyapache profiles from the easyapache page.
Only "customize" and "provision".
So how can unused/older profiles be really deleted, same with the selection choice of old php 5.x versions?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,253
2,219
363
cPanel Access Level
Root Administrator
Hey there! If you go back into EasyApache and use the "customize" option, it would tel you if there are any handlers that would be in conflict, and give you an option to adjust that.

As far as the profiles, you can only remove custom profiles and not the system defaults, which is likely why you don't see that option. There's an older feature request for this at https://features.cpanel.net/topic/delete-custom-easyapache4-profiles but I'll bring that up with the team to get some fresh eyes on it during our meeting next week.
 
  • Like
Reactions: rhm.geerts

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
Some sites did not work anymore, throwing error so I had to put back the previous backup. So might have indeed been the php handlers which were causing the issue.

I had started the customize option again to check this, but it did not state any conflict.
It did when I changed the handler, but it automatically disabled the old handler and mod_ruid2 (because I selected mpm_event too). But it looked as something has went wrong during provisioning.

Set everything back and now the sites throwing error 500's are running again.

I already upvoted the feature request in the past. I didn't remember the directory mentioned there to manually remove the profiles. However, would be much nicer and easier if the root admin could just select them from the GUI and then select delete. Thank you for being willing to bring that up again during the meeting.

So something must have gone wrong during provisioning, but I think we only are going to try again after the holidays, to be sure everything keeps running for now.

Oh yes, last question, if we are going to run php-fpm with fastcgi, will .htaccess files still be able to be used? Is htscanner installed automatically or something? Or do we even need htscanner for this?
 

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
Oh that would be nice. I'm normally doing things like this at night time (around 01.00 GMT+1) to prevent disturbing customers.

Maybe next time I can better first disable the conflicting stuff, then use the provision and then change to mod_proxy_fcgi and mpm_event and then provision again instead of letting cPanel do it all automatically?
 

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
Sure thing!
We're in the new year so I get back at this. And now suddenly I stumbled onto this answer from your collegue in another thread:

I do have php-fpm running as far as I know. So it doesn't even look at the php handler, so in fact I don't have to change anything in the handler section, correct?

However, we do want to do this:
1.) start using http2
2.) start using mpm_event instead of prefork.
3.) change Centos 7 to Almal Linux 8.x

You guys do that for us for free? Is that correct? I just have to create a ticket and ask?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,253
2,219
363
cPanel Access Level
Root Administrator
For 1 and 2, yes, just open a ticket. For option 3, the tools are still experimental but our team would be happy to take a look at that for you and see if there is anything that would keep that from working well on your system.
 

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
Thank you very much.
As for 3 I asked that since I see a lot of automatic backups from profiles going on, which are stating about conversion to Almalinux 8. Which made me things the tools were already quite stable.

But if the tools are experimental, we might better wait a bit for that as Centos 7 is not end of support yet and maybe end of the year the tools might be improved.
Or otherwise in a year maybe the owner wants to get a new server.

I will shoot in a ticket then this week for 1 and 2. Thank you!
 
  • Like
Reactions: cPRex

rhm.geerts

Well-Known Member
Jul 29, 2008
179
23
68
Maastricht
cPanel Access Level
Root Administrator
Ah oke, good to let me know. However, we will not be using anything higher than php 8.1 for the time being on that server.
But it's good to know in case something comes up, thank you.
 
  • Like
Reactions: cPRex