• Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows
Chat
Writy.
No Result
View All Result
My Account
Writy.
No Result
View All Result
sxi
No Result
View All Result

Home How to Install PHP Composer on Cpanel

How to Install PHP Composer on Cpanel

SXI ADMIN by SXI ADMIN
September 29, 2019
in Blog
Reading Time: 4 mins read
A A
0
Share on FacebookShare on Twitter

(: November 14, 2018)

In this guide, we will cover the installation of PHP Composer on Cpanel. Composer is a PHP dependency management tool. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Composer doesn’t come pre-installed with PHP or Cpanel and you’ll have to install it manually. Follow our steps below to install PHP Composer on Cpanel.

Step 1: Install required PHP modules in EasyApache

To use Composer, you must enable several PHP modules in EasyApache.

.td_uid_2_5d9065c9b9ed5_rand.td-a-rec-img{text-align:left}.td_uid_2_5d9065c9b9ed5_rand.td-a-rec-img img{margin:0 auto 0 0}

1. Login to your Cpanel WHM dashboard and search for EasyApache

2. Click on the EasyApache 4 to enable PHP modules

3. Click on the buttonCustomize.

4. Navigate to PHP Extensions section

5. Search for extensionsIconv & Mbstring to install.

6. Click on install toggle to enable installation for these extensions

7.  On the Review Page, click the buttonProvision to install the extensions.

8. If the installation was successful, you should receive the message Provision process finished. Click Done.

Step 2: Set required PHP directives

You must update the following PHP directives in the php.ini file:

Directive
Required value
allow_url_fopen On

detect_unicode

Off

1. Navigate to WHM > MultiPHP INI Editor > Editor Mode

2. Edit the INI settings of a PHP version on the dropdown menu. Add the following lines at the end of the php.ini file.

allow_url_fopen = On
detect_unicode = Off

It should look like below

You must click “Save” to apply the new changes.

Step 3:  Install PHP Composer on Cpanel Server

Now that we have our dependencies set correctly, ssh into your Cpanel Server and download Composer installer:

wget 'https://getcomposer.org/installer -O composer-installer.php

Run the installer script to deploy Composer globally:

php ./composer-installer.php --install-dir=/usr/local/bin --filename=composer

You should see output like below:

All settings correct for using Composer
Downloading...

Composer (version 1.7.3) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

You should be able to use composer command

 ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ / __ `__ / __ / __ / ___/ _ / ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
____/____/_/ /_/ /_/ .___/____/____/___/_/
                    /_/
Composer version 1.7.3 2018-11-01 10:05:06

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

To check for the installed version of composer, type the command:

# composer -V
Composer version 1.7.3 2018-11-01 10:05:06

Here you go!. You now have Composer dependency Manager for PHP installed on your Cpanel Server. Other Cpanel articles available are:

How to add PHPZIP Archive in cPanel

Configure Cpanel Firewalld on CentOS 7

.td_uid_4_5d9065c9ba0eb_rand.td-a-rec-img{text-align:left}.td_uid_4_5d9065c9ba0eb_rand.td-a-rec-img img{margin:0 auto 0 0}
Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
Tags: ComposercPanelCpanelHackingLinux TutorialsPHPWeb Hosting
SXI ADMIN

SXI ADMIN

Related Stories

Hostbillapp Enterprise v2022-05-02 Nulled 2022 and 2019 Theme License Hostbill 2022 nulled

Hostbillapp Enterprise v2022-05-02 Nulled 2022 and 2019 Theme License Hostbill 2022 nulled

by SXI ADMIN
May 17, 2022
0

Demo : https://bitdom.org/ All modue : PowerDNS, SolusVM, Proxmox, OnApp, Openstack, Cloudstack, vSphere, Virtualizor Contact : https://t.me/sxillc Enable auto-charge by...

Link download Kali Linux 2021.2 torrent live cd and Installer

Link download Kali Linux 2021.2 torrent live cd and Installer

by SXI ADMIN
June 3, 2021
0

Live Run Kali Linux https://cdimage.kali.org/kali-2021.2/kali-linux-2021.2-live-amd64.iso Installer 4GB https://cdimage.kali.org/kali-2021.2/kali-linux-2021.2-installer-amd64.iso and full all : https://www.kali.org/get-kali/#kali-platforms

WHMCS 8.2 Beta Nulled

CentOS / RHEL 7 Restart / Stop / Start Networking Command

by SXI ADMIN
May 22, 2021
0

Say hello to systemctl command Use this command to control the systemd system and act as a service manager. CentOS...

WHMCS 8.2 Beta Nulled

WHMCS 8.2 Beta Nulled

by SXI ADMIN
May 20, 2021
0

We're excited to announce the beta release of WHMCS 8.2. Be among the first to try out the new features...

You have a Great  Business Idea?

How to create CentOS 7 and CentOS 8 bootable USB drive in Windows Step

by SXI ADMIN
May 19, 2021
0

Most of tools available to create bootable USB drive doesn’t worked on CentOS 7. Problems like unable to boot, unable to...

Wowza Streaming Engine 4.8.12+1 Crack

by SXI ADMIN
August 24, 2021
0

Tested and working in Windows and Linux. Exclusively for the forum, exactly one day before I post it on the...

Load More
Next Post
Install Zulip Chat Server on Ubuntu 18.04 / 16.04 / Debian 9

Install Zulip Chat Server on Ubuntu 18.04 / 16.04 / Debian 9

Popular Story

  • EMEDITOR PROFESSIONAL Full Key V11~V19

    645 shares
    Share 258 Tweet 161
  • Plesk Obsidian Lifetime license Key Version 18.0.15

    644 shares
    Share 258 Tweet 161
  • Plesk Onyx + Obsidian 18 Web Host Edition Nulled/Crack

    614 shares
    Share 246 Tweet 154
  • How To Start/Stop/Restart Cron Service In Linux Centos 7

    610 shares
    Share 244 Tweet 153
  • Download Windows Templates for Virtualizor KVM Windows server 2008,2012,2016,2019

    608 shares
    Share 243 Tweet 152
SXI.IO

© 2022 Vps giá rẻ

Navigate Site

  • Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows

Follow Us

No Result
View All Result
  • Ubuntu
  • Python
  • Windows
  • VirtualBox
  • Git
  • Docker
  • Windows

© 2022 Vps giá rẻ