[英]Using CLI to use phar file not working
Currently I am trying to install codeception and using a CLI to get the file and install it. 当前,我正在尝试安装代码接收并使用CLI来获取文件并安装它。 I am new with the CLI and conneting using SSH.
我是CLI的新手,并使用SSH进行联网。 However getting used to it.
但是要习惯它。 I downloaded the file using
$ WGET
and then executed $ php codecept.phar bootstrap
. 我使用
$ WGET
下载文件,然后执行$ php codecept.phar bootstrap
。
The CLI (cygwin) does not do anything. CLI(cygwin)不执行任何操作。 It simply create a new line
c?$
I can then just continue using the CLI. 只需创建一个新行
c?$
然后我就可以继续使用CLI。 Nothing happens though. 不过什么也没发生。 So I figured I just try to use composer to installed codeception.
所以我想我只是尝试使用composer来安装代码接收。 Used the CLI to download composer.phar and ran it using
$ php composer.phar
. 使用CLI来下载composer.phar并使用
$ php composer.phar
运行它。 Then it create a new line ????$
. 然后创建新行
????$
。 I can then just used the CLI again and nothing changes or happend. 然后,我可以再次使用CLI,而没有任何更改或发生任何事情。
My assumption is that there is something wrong with executing phar files. 我的假设是执行phar文件有问题。 Is there some setting wrong?
设置有误吗?
Some extra data: 一些额外的数据:
$ php -v
: $ php -v
:
PHP 5.3.27 with Suhosin-Patch (cli) (built: Jul 25 2013 14:17:18)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
$ php -m
: $ php -m
:
Contains both phar and curl with are both needed for codecept. 同时包含phar和curl与codecept都需要。
$ php -i
: (Phar section) $ php -i
:(Phar部分)
Phar
Phar: PHP Archive support => enabled
Phar EXT version => 2.0.1
Phar API version => 1.1.1
SVN revision => $Id: 21d763042eb5769ae0a09dc1118df2b5aae6fb33 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
OpenSSL support => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On
Suhosin blocks the phar file, see http://cweiske.de/tagebuch/suhosin-phar.htm Suhosin阻止了phar文件,请参见http://cweiske.de/tagebuch/suhosin-phar.htm
Solution: Whitelist the phar protocol: 解决方案:将phar协议列入白名单:
$ emacs /etc/php5/cli/conf.d/suhosin.ini
.. add the following line:
suhosin.executor.include.whitelist = phar
This is explained on the composer site btw. 在作曲家网站btw上对此进行了解释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.