php – 无法通过ssh访问服务器下载composer – 1and1
发布时间:2020-12-13 17:51:33 所属栏目:PHP教程 来源:网络整理
导读:我有SSH访问我的1and1服务器.我正在尝试下载作曲家. 遵循http://getcomposer.org/download/的指示 尝试1: user:~ curl -sS https://getcomposer.org/installer | phpX-Powered-By: PHP/4.4.9Content-type: text/htmlbr /bParse error/b: syntax error,unexp
我有SSH访问我的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正在运行.关于这里发生了什么的任何建议? phpinfo()函数 php -v
目前1& 1提供了一堆不同别名的PHP版本.
但是,设置默认PHP版本的最简单方法是使用1& 1仪表板PHP设置,并逐个设置每个域.它位于Hosting下,然后是PHP设置. [1&1 PHP Settings (United States site)] 请注意,1and1现在非常定期更新PHP版本,并且CLI版本可能与呈现站点的一个用户不同. 原始答案.已经很久了,我建议使用最新的7.x. 命令: > php:4.4版(你实际上和作曲家一起使用的那个.) 你必须使用php5.5调用composer,它才会起作用. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |