installation of composer on shared hosting

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

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.




2 Answers
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.


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





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.
– Bhavin
Mar 1 '17 at 6:13






Laravel 5.2 requires PHP version to be greater than or equal to 5.5.9
– Shakti Phartiyal
Mar 1 '17 at 6:16





Try laravel 4.2 using: php composer.phar create-project laravel/laravel 4.2
– Shakti Phartiyal
Mar 1 '17 at 6:17


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.
– Bhavin
Mar 1 '17 at 6:20




If you use SiteGround you will be a lucky man, just must request access do ssh (over cpanel), and then run your composer command on terminal.


composer



SiteGround servers already have composer globally installed.



BUT... you you want to do it on hard way, access you shell on Siteground and run:


wget https://getcomposer.org/composer.phar -O $HOME/composer.phar
echo "alias composer="/usr/local/php72/bin/php-cli $HOME/composer.phar "" >> $HOME/.bashrc
source $HOME/.bashrc
composer --version



Just pay attention on php72 version, it's uses PHP 7.2. If you want or need another one do a ls /usr/local/ to see all versions.


ls /usr/local/






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

Trying to Print Gridster Items to PDF without overlapping contents

Hystrix command on request collapser fallback