我的客戶端使用Apache PHP版本5.6.30的服務器,但CLI PHP版本是5.4.16。他們不能更改CLI PHP版本。如何使用PHP CLI版本5.4.16將Laravel 5.4項目推送到服務器?
我使用Git & & SSH將項目從本地計算機推送到服務器。但由於CLI PHP版本是5.4.16,我不能運行
composer install
我會得到這些消息
Problem 1
- This package requires php >=5.6.4 but your PHP version (5.4.16) does not satisfy that requirement.
Problem 2
- symfony/var-dumper v3.3.2 requires php >=5.5.9 -> your PHP version (5.4.16) does not satisfy that requirement.
- symfony/var-dumper v3.3.2 requires php >=5.5.9 -> your PHP version (5.4.16) does not satisfy that requirement.
- Installation request for symfony/var-dumper v3.3.2 -> satisfiable by symfony/var-dumper[v3.3.2].
的phpinfo()函數告訴PHP的版本是30年6月5日。所以我猜這部分應該沒問題。但我不知道要解決這種情況。
當我去的網站,我收到以下錯誤消息:
Warning: require(/var/www/vhosts/example.com/httpdocs/vendor/composer/ClassLoader.php): failed to open stream: No such file or directory in /var/www/vhosts/example.com/httpdocs/vendor/composer/autoload_real.php on line 12
Warning: require(/var/www/vhosts/example.com/httpdocs/vendor/composer/ClassLoader.php): failed to open stream: No such file or directory in /var/www/vhosts/example.com/httpdocs/vendor/composer/autoload_real.php on line 12
Fatal error: require(): Failed opening required '/var/www/vhosts/example.com/httpdocs/vendor/composer/ClassLoader.php' (include_path='.:/opt/plesk/php/5.6/share/pear') in /var/www/vhosts/example.com/httpdocs/vendor/composer/autoload_real.php on line 12
'/path/to/php-5.6 /路徑/到/作曲家install' – Devon
如果從@Devon建議不工作,你總是可以嘗試欺騙和直接向上拷貝到服務器運行PHP cli二進制。當然,這本身可以是一項壯舉。 –
@ceejayoz PHP 5.4在CentOS/RHEL7將獲得另一個5年以上的安全更新,然而,的Plesk可以安裝其他版本旁邊的系統版本是什麼OP所指的。 – Devon