脚本宝典收集整理的这篇文章主要介绍了php – 无法通过ssh访问服务器下载composer – 1and1,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
遵循http://getcomposer.org/download/的指示
尝试1:
user:~ > curl -sS https://getcomposer.org/installer | PHP X-Powered-By: PHP/4.4.9 Content-tyPE: text/htML <br /> <b>Parse error</b>: Syntax error,unexpected '{' in <b>-</b> on line <b>316</b><br />
尝试2:
PHP -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" Error in argument 1,char 2: option not found r usage: PHP [-q] [-h] [-s] [-v] [-i] [-f <file>] PHP <file> [args...] -a Run interactively -b <address:port>|<port> Bind Path for external FASTCGI Server mode -C Do not chdir to the script's directory -c <path>|<file> Look for PHP.ini file in this directory -n No PHP.ini file will be used -d foo[=bar] define INI entry foo wITh value 'bar' -e Generate extended information for debugger/PRofiler -f <file> Parse <file>. Implies `-q' -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -q Quiet-mode. SupPress HTTP Header output. -s Display colour Syntax highlighted source. -v Version number -w Display source with stripped comments and whitespace. -z <file> Load Zend extension <file>.
我做错了什么吗?
我知道它说我运行PHP 4.4.9,但如果我运行PHPinfo(),它说PHP版本5.4.21正在运行.关于这里发生了什么的任何建议?
PHP -v
但是,设置默认PHP版本的最简单方法是使用1& 1仪表板PHP设置,并逐个设置每个域.它位于Hosting下,然后是PHP设置. [1&1 PHP Settings (United States site)]
请注意,1and1现在非常定期更新PHP版本,并且CLI版本可能与呈现站点的一个用户不同.
原始答案.已经很久了,我建议使用最新的7.x.
实际上在所有1and1 linux共享主机上预装了4个版本的PHP.
命令:
> PHP:4.4版(你实际上和作曲家一起使用的那个.)
> PHP5:版本5.2
> PHP5.5:版本5.5
> PHP6:版本5.4
以上是脚本宝典为你收集整理的php – 无法通过ssh访问服务器下载composer – 1and1全部内容,希望文章能够帮你解决php – 无法通过ssh访问服务器下载composer – 1and1所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。