Introduction
Several steps are required to install PHP's Composer on cPanel systems. Additionally, there are requirements such as enabling allow_url_fopen, which must be considered for security before installation.
Procedure
Composer requires multiple PHP modules to function:
- Phar
- Iconv or MBstring
Our default profiles provide these packages; however, if you have used a custom profile, you may need to enable these in EasyApache 4:
Composer also requires multiple settings to be enabled in the php.ini zend.detect_unicode. This can be enabled in the user's php.ini :
zend.detect_unicode = Off
allow_url_fopen must also be enabled, which varies depending on your PHP setup:
Changing the "allow_url_fopen" Setting for PHP
If you use Suhosin, you must also whitelist the phar module in the servers php.ini:
suhosin.executor.include.whitelist=phar