Symptoms
When accessing PHP Selector in a cPanel account on a CloudLinux server, you may see the following error message:
Error
Not allowed operation: LangPHP::php_get_installed_versions
Description
We can gather more information about this error message by attempting to run the API function manually:
# uapi --user=$username LangPHP php_get_installed_versions
---
apiversion: 3
func: php_get_installed_versions
module: LangPHP
result:
data: ~
errors:
- You do not have the feature “multiphp”.
messages: ~
metadata: {}
status: 0
warnings: ~
The error message suggests that the affected account does not have access to the MultiPHP Manager feature.
You can verify this from the Home >> Packages >> Feature Manager >> Edit Feature List page in WHM by selecting the Feature List that is assigned to the affected account.
Workaround
In order to access the PHP Selector interface without receiving this error message, you will need to access the Edit Feature List page and select the Feature List that is assigned to the affected account. Make sure "MultiPHP Manager" is enabled.
If the "MultiPHP Manager" option is greyed out and unselectable, this may indicate that the MultiPHP Manager is selected on the "disabled" Feature List.
# grep -i multi /var/cpanel/features/disabled
multiphp=0
multiphp_ini_editor=0
You will need to remove MultiPHP Manager from the "disabled" Feature List in order to enable it for any cPanel account on your server.