问题描述
我已经坚持了几天。我使用的是1and1托管,他们的PHP设置有些奇怪。
I've been stuck at this for a few days. I'm using 1and1 hosting, and they have their PHP set up a bit weird.
如果我只使用 php composer.phar install
,那么我使用的是PHP 4.4.6,这远远不够。但是,我可以运行 php5.5 composer.phar install
,进行更多操作,但是它仍然会失败,因为在某个地方,再次调用了PHP,但是失败了,因为它使用的是4.4.6。
If I use just php composer.phar install
, then I'm using PHP 4.4.6, which is horribly insufficient. However, I can run php5.5 composer.phar install
, get a little bit further, but it still fails because somewhere along the line, PHP is called again, but it fails, as it's using 4.4.6.
有没有办法告诉Composer使用 php5.5
命令?有没有人成功在1and1主机上配置Composer?
Is there any way to tell Composer to use the php5.5
command? Has anyone successfully gotten Composer configured on 1and1 hosting?
我正在尝试启动Laravel并使其运行(使用Composer)。我已经可以在GoDaddy域上执行此操作,但不能在1and1上执行。
I'm trying to get Laravel up and running (which uses Composer). I've been able to do it on my GoDaddy domain, but not 1and1.
推荐答案
Ubuntu 18.04案例...运行
Ubuntu 18.04 case ... this run for me.
/usr/bin/php7.1 /usr/local/bin/composer update
这篇关于告诉Composer使用不同的PHP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!