How to install composer on godaddy shared hosting?
Asked Answered
I

3

7

I'm trying to install composer and I'm getting an error ,

What I did ,

  1. Downloaded composer wget https://getcomposer.org/installer
  2. php installer --check

All settings correct for using Composer

  1. php installer

The error I got ,

The "https://getcomposer.org/versions" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed The download failed repeatedly, aborting.

I tried google but no luck

Isosteric answered 1/12, 2017 at 15:2 Comment(4)
Composer requires PHP's openssl extension, you're probably missing it. (Or it's too old to work with the remote Composer server.)Maulstick
@AlexHowansky How to add openssl extension ?Isosteric
Run php -m from the command line, that will list the enabled extensions. Then run php -v to see what version of PHP you have. Post the results into your question.Maulstick
FWIW, there's usually little need to install composer on the production server. You can use it to install all dependencies locally, package that up and upload it to the server…Wedding
P
9

I know this question is quite old, but I've been looking for an answer to it for a while and just got it answered, so here it is.

Can you install composer on a Godaddy shared hosting: no you can't.

BUT

Godaddy Shared hosting used to use a legacy control panel. If your shared hosting account is old, you are most likely using it. But, Godaddy has moved to cPanel for Linux hosting and all new Linux shared hosting purchases now come with it. The good news is, there is a version of Composer installed on these accounts (currently it's 1.1.1).

Follow this link to see software versions on Godaddy's hosting accounts.

I was on the phone with Godaddy's tech support, and they confirmed that Composer was installed out-of-the-box for cPanel hosting accounts.

Hope that helps.

Penna answered 25/3, 2018 at 1:29 Comment(1)
Alternatively, you might be able to use the portable version of Composer but I did not try it. To get the portable version of Composer curl https://getcomposer.org/installer | php and then use it with php composer.phar some-command or with ./comoser.phar some-command if the file is marked as executable.Penna
S
1

You can install Composer 2 on godaddy

From your home directory /home/[USER] do

wget https://getcomposer.org/installer
php installer

Once it is installed you can then setup an alias in your .bashrc file so every time you run composer it uses the new 2.0+ version

nano .bashrc
alias composer='php /home/[USER]/composer.phar'
Salesperson answered 22/8, 2021 at 4:44 Comment(0)
S
0

GoDaddy Provides Composer as Preinstalled with your hosting. You can access the command line tools like Composer by SSH. Request SSH Access for your Account. as the Account gets activated, you can access SSH by your FTP userId and Password. to check the composer is installed, just run composer -v.

Strigil answered 11/3, 2019 at 6:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.