GeniusTS / hijri-dates

PHP library to convert Gregorian date to Hijri date and vice versa
MIT License
100 stars 37 forks source link

cannot install with ssh #3

Closed falmahdi closed 6 years ago

falmahdi commented 6 years ago

in SSH I tried to run: composer require geniusts/hijri-dates

but I recieve the error: [InvalidArgumentException] Could not find package geniusts/hijri-dates at any version matching your PHP version 5.6.31.0

I'm on BLUEHOST.COM shared server. Using php 7.0.12 However when I run "php -v" on SSH I get php 5.6.31.0 !!! Any Idea why ?

Thanks for your efforts

aboudeh87 commented 6 years ago

most of shared server run PHP version 5 in the console try to find the path of PHP7 in your server, I don't know it in BLUEHOST, but in HOSTGATOR is /opt/php71/bin/php

falmahdi commented 6 years ago

Thank you so much Aboudeh. It works well now. For future Bluehost clients here is what I did: in Bluehost control panel: -Find PHP Configuration icon -Select php 7 -Save

Then in SSH: export PATH=/opt/php70/bin:$PATH mkdir ~/common cd ~/common composer require nesbot/carbon composer require geniusts/hijri-dates

in my php script I added: require_once '../../common/vendor/autoload.php'; (or whatever path you wish to store the common directory)

I tested your work and it's awsome

falmahdi commented 6 years ago

With all respect. your name is Abdul-Kader Zein-Eddin