3

I have installed composer on shared hosting. It's successfully installed on my shared hosting. I have followed this tutorial for installation.

Link :- https://www.globo.tech/learning-center/laravel-under-cpanel/

Screenshot after installation.

enter image description here

I have used below command and it's working fine for me.

php composer.phar

But when I tried to install laravel in my public_html directory using below command,

composer create-project --prefer-dist laravel/laravel borrowpet "5.2.*"

It's not working. It shows composer command not please find below screenshot for error.

enter image description here

Please let me know what I'm missing while installing composer.

1 Answer 1

2

Use the command php composer.phar create-project --prefer-dist laravel/laravel borrowpet "5.2.*" and make sure you execute the command from the directory where compser.phar exists.

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you brother i think composer's problem is solved. It showing me this error so this server has installed php version 5.4.45 but laravel needs higher version so is it possible to install laravel 5.2 on lower version? Error :-[InvalidArgumentException] Could not find package laravel/laravel with version 5.2.* in a version installable using your PHP version 5.4.45.
Laravel 5.2 requires PHP version to be greater than or equal to 5.5.9
Try laravel 4.2 using: php composer.phar create-project laravel/laravel 4.2
Ohk. Thank you brother my problem for this question's problem is solved. No I will go for upgrading my php version on shared hosting because I have use laravel 5.2.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.