Resource icon

Modules in PHP is not loading properly

Introduction:

When we come across these type of problem in our server which has installed with cloud Linux OS with the PHP selector. The server control panel is installed with the latest Easy Apache 4. The native for this PHP is set as PHP 5.4 from the Easy apache. All websites which are running under this 5.4 version was throwing the following error on web browser after we enabled the mod_Isapi

Code:
Unhandled Exception:

Message
Module ‘gmp’ already loaded

Location
UnKnown on Line 0
Reason why it is not taking the module added by default and the solution

This problem can be fixed with cagefsctl command

Step1:

First you need to login into WHM server as a root user and change the server native to Cloud Linux 5.4. This can be done using “CloudLinux LVE manager

Step2:

Now we have to execute the following commands:

Code:
# cagefsctl --cl-selector-reset-modules
To set this for any particular user, we need to execute the following command with their corresponding username

Code:
# cagefsctl --cl-selector-reset-modules $user1 $user2
Step3:

Now we are almost done. Now we can go ahead and switch all our accounts from our old PHP version to Cloud Linux PHP 5.4

To do this you can use the selectorctl to switch the PHP version of any particular account through the command lines. We first need to make sure on which particular account is still using the old PHP version. To do this we need to execute one command

Code:
# selectorctl --list-users --version=native


Step4:

Now we need to change the PHP version of that particular user who is using the old PHP version. To proceed with this we need to execute the following command in order to switch that user.

Code:
# selectorctl --change-to-version=5.4 --version=native
Author
Bhawani Singh
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Bhawani Singh

Top