【发布时间】:2023-03-05 11:48:01
【问题描述】:
我可以通过 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 Version 5.4.21 正在运行。对这里发生的事情有什么建议吗?
phpinfo()
php -v
【问题讨论】:
-
你运行过最近的 PHP 吗?
-
这很奇怪...如果我运行 phpinfo,我会得到
PHP Version 5.4.21 -
php -v带给你什么? -
PHP 5.4.21 (cgi-fcgi)(构建时间:2013 年 10 月 18 日 08:45:55)版权所有 (c) 1997-2013 PHP Group Zend Engine v2.4.0,版权所有 (c) 1998 -2013 Zend 技术
-
我想知道
X-Powered-By: PHP/4.4.9是从哪里来的。因为当我检查 getcomposer.org/installer 的标题时,它不存在..
标签: php composer-php