質問

Currently I am trying to install codeception and using a CLI to get the file and install it. I am new with the CLI and conneting using SSH. However getting used to it. I downloaded the file using $ WGET and then executed $ php codecept.phar bootstrap.

The CLI (cygwin) does not do anything. It simply create a new line c?$ I can then just continue using the CLI. Nothing happens though. So I figured I just try to use composer to installed codeception. Used the CLI to download composer.phar and ran it using $ php composer.phar. Then it create a new line ????$. I can then just used the CLI again and nothing changes or happend.

My assumption is that there is something wrong with executing phar files. Is there some setting wrong?

Some extra data:

$ 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:

Contains both phar and curl with are both needed for codecept.

$ php -i: (Phar section)

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

Solution: Whitelist the phar protocol:

$ 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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top