Operating System & Version
Centos
cPanel & WHM Version
latest

howardfmcw

Active Member
Dec 26, 2019
36
4
8
UK
cPanel Access Level
Root Administrator
Hi. very few of my cpanel users wants php 5.6 version for their sites. now i have disabled/uninstalled that version due to EOL. just wanted to know is there any option available where i can just allow/enable that version for only those cpanels? i don't want to Show in Multi-PHP and PHP Selector that specific version.

Using latest WHM with Centos 7 + Cloudlinux.


Thanks
 

HostNoc

Well-Known Member
Feb 20, 2020
155
38
28
Ontario
cPanel Access Level
Root Administrator
HI @howardfmcw

1. Make sure you have CageFS / PHP Selector installed
2. Make sure all of your users are caged in CageFS
3. Make sure that none of your users have "native" selected in their PHP Selector

If "native" is available in PHP Selector and is selected, the user will be using MultiPHP defaut system PHP version. You wouldnt' want that.

After making sure that none of your users have "native" selected in their PHP Selector, you'll then want to disable "native" completely so that they do not even have an option to select it within PHP Selector. You would do that by going to WHM --> CloudLinux LVE Manager --> Selector.

Default PHP Version: set this to something other than "native"
Supported Versions: click "native" and disable

4. Go into MuliPHP Manager

a. select a default system PHP version
b. set all of your / your customers' domains to "inherit"

5. Go into the Feature Manager --> Manage Feature List "disabled" and edit it

MultiPHP Manager and MultiPHP INI editor and save

This will make sure that MultiPHP INI editor and MultiPHP manager are not available in customer's cPanel interface

Now all of your users are using PHP selector and only PHP selector -- and they cannot choose "native" in PHP Selector and cannot see MultiPHP Manager or MultiPHP INI Editor in their cPanel interface.
 
  • Love
Reactions: howardfmcw

howardfmcw

Active Member
Dec 26, 2019
36
4
8
UK
cPanel Access Level
Root Administrator
Hi, Thanks for the explaination but wanted to ask that Not allowing them PHP INI editor is good for me and them? and what if the ask to allow php ini editor as well after disabling that?



HI @howardfmcw

1. Make sure you have CageFS / PHP Selector installed
2. Make sure all of your users are caged in CageFS
3. Make sure that none of your users have "native" selected in their PHP Selector

If "native" is available in PHP Selector and is selected, the user will be using MultiPHP defaut system PHP version. You wouldnt' want that.

After making sure that none of your users have "native" selected in their PHP Selector, you'll then want to disable "native" completely so that they do not even have an option to select it within PHP Selector. You would do that by going to WHM --> CloudLinux LVE Manager --> Selector.

Default PHP Version: set this to something other than "native"
Supported Versions: click "native" and disable

4. Go into MuliPHP Manager

a. select a default system PHP version
b. set all of your / your customers' domains to "inherit"

5. Go into the Feature Manager --> Manage Feature List "disabled" and edit it

MultiPHP Manager and MultiPHP INI editor and save

This will make sure that MultiPHP INI editor and MultiPHP manager are not available in customer's cPanel interface

Now all of your users are using PHP selector and only PHP selector -- and they cannot choose "native" in PHP Selector and cannot see MultiPHP Manager or MultiPHP INI Editor in their cPanel interface.
 

howardfmcw

Active Member
Dec 26, 2019
36
4
8
UK
cPanel Access Level
Root Administrator
BTW i have applied the same method. but after doing that, that site is still showing HTTP error 500. i have changed its php version to 5.6 with php-fpm through WHM, and its showing 7.2 in cpanel selector. can you guide why its showing http 500 error still? as before uninstalling 5.6 php version it was set on 5.6 and working fine. but now after reinstalling that 5.6 its not working.



Hi, Thanks for the explaination but wanted to ask that Not allowing them PHP INI editor is good for me and them? and what if the ask to allow php ini editor as well after disabling that?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


I'm not aware of any method which you can have a PHP version present for one account but not another. You can choose to have the PHP Selector or MultiPHP interfaces disabled for users so that they would be unable to make changes to their PHP Configuration, this can be done through the Feature Manager within WHM.
 
  • Like
Reactions: howardfmcw

howardfmcw

Active Member
Dec 26, 2019
36
4
8
UK
cPanel Access Level
Root Administrator
Hello,


I'm not aware of any method which you can have a PHP version present for one account but not another. You can choose to have the PHP Selector or MultiPHP interfaces disabled for users so that they would be unable to make changes to their PHP Configuration, this can be done through the Feature Manager within WHM.


its okay, disabled method is fine but after doing that, that site is still showing HTTP error 500. i have changed its php version to 5.6 with php-fpm through WHM, and its showing 7.2 in cpanel selector. can you guide why its showing http 500 error still? as before uninstalling 5.6 php version it was set on 5.6 and working fine. but now after reinstalling that 5.6 its not working.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hello,


What is the output in the error log? You can view the apache error log at /etc/apache2/logs/error_log

You can also create a PHP Info page to see what PHP version is being used on the domain in actuality. You can create a phpinfo.php page in the document root for the domain (usually public_html) and it should include the following:

Code:
<?php


// Show all information, defaults to INFO_ALL
phpinfo();


?>
 
  • Love
Reactions: howardfmcw