Modules in PHP is not loading properly

Modules in PHP is not loading properly

  1. Bhawani Singh

    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

    Unhandled Exception:
    Module ‘gmp’ already loaded
    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


    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”


    Now we have to execute the following commands:

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

    # cagefsctl --cl-selector-reset-modules $user1 $user2

    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

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


    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.

    # selectorctl --change-to-version=5.4 --version=native