BarthFox Idman
BarthFox Idman

Reputation: 17

Problems installing composer on 1and1 shared hosting

I t's my first time to a laravel web application on 1and1. For my dependances i need composer but i can't install it. This is what i made. I create the following folders bin/composer then i install composercurl -sS https://getcomposer.org/installer | php7.1 Result: `X-Powered-By: PHP/7.1.12 Content-type: text/html; charset=UTF-8

All settings correct for using Composer Downloading...

Composer (version 1.6.2) successfully installed to: /homepages/11/d715566175/htdocs/bin/composer/composer.phar Use it: php composer.phar

When i usephp composer.phari got these errors: X-Powered-By: PHP/4.4.9 Content-type: text/html


Parse error: syntax error, unexpected T_STRING in /homepages/11/d715566175/htdocs/bin/composer/composer.phar on line 95
Even php -v returns4.4.9` Need your helps Thanks

Upvotes: 1

Views: 2360

Answers (2)

manuxi
manuxi

Reputation: 352

For me it was

/usr/bin/php7.4-cli composer.phar -v

Upvotes: 0

common sense
common sense

Reputation: 3898

Your default PHP which you call with php refers to an old version of PHP . Try php7.1 composer.phar.

Upvotes: 6

Related Questions