PHP’s sole package manager and dependency is the composer. The user’s cPanel account ought to possess SSH access for using the composer. The composer’s role is also to provide a conventional format of PHP software and the other required libraries.
For using composer, one should install the numerous PHP modules and also verify that the server’s php.ini file has been configured properly. This file is essential for the proper running of the composer. By default, when the composer is called- it makes use of the server’s php.ini file solely.
Let’s take a look at the required PHP modules necessary for setting up composer in WHM:
Make sure the several PHP modules are enabled in Easy Apache. Some of them are enlisted below-
In case you are unable to make alterations in the php.ini file, you have to run a certain command mentioned by the cPanel. In case you use the composer quite often, you can create the Bash alias for performing this command for you. The composer command can be run without any additional options and flags if the alias has been added.
In case a user is unable to make manual changes in the php.ini file, a specific command as displayed by the cPanel’s server will have to be run as well.
In case a user receives the ‘command not found’ error message, a proper path to their cPanel account’s .bash_profile file has to be added. If problems are being experienced with the source option itself, click on the PATH option to the .bash_profile file.
The composer of the cPanel consists of a self diagnostic tool which ensures that one has properly and accurately configured the PHP.
There are alternative diagnostic tools which can be used from the account of the Composer’s Github.