Search code examples
laravel-5composer-phpshared-hosting

installation of composer on shared hosting


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.


Solution

  • 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.