Good day.

Please tell me something you can not set Codeception. I have a site on a test server. Worth bitrixVM 5.0. The site itself is located at /home/bitrix/www/

Through the command line as root, go to the root of the site and enter this command

wget http://codeception.com/codecept.phар

The codecept.phar file appeared at the root

Next, I enter the command

php codecept.phar bootstrаp

Error is displayed

PHP Fatal error: Class 'Phar' not found in /home/bitrix/www/codecept.phar on line 3

I do not understand, like doing everything according to the instructions

    2 answers 2

    Apparently, there is no PHP extension in the PHP binary that is launched (which is strange, because it is usually compiled into a binary). Phar is just a PHP project archive for distribution in one file; You can set a codeception via composer to bypass phar-problems guaranteed: composer require codeception/codeception:~2.0 . In this case, the executable file is installed in vendor/bin/codecept with respect to the project folder, working with it will be no different from working with phar.

    Output
    be

    http://tsya.ru -_-

    • I understand correctly that in order for the instruction for phar to work, you need to install the phar extension in php? - murad30
    • @ murad30, it seems. I always put it through the composer, however, it spreads itself like phar; in general, check the included extensions and the PHP version. - etki
    • Installation via composer also fails with me. Tried to run the script - php composer.phar require "codeception / codeception" is at the root of codecept.phar, tried without it here is the result i.imgur.com/rbldl2g.png - murad30
    • @ murad30, well, so composer.phar you first need to download from getcomposer.org. But anyway, first of all check the version of PHP, if it is lower than 5.4, then the codeception will not start at all. - etki
    • I did all the instructions as described here - github.com/Codeception/Codeception for phar / I created all the necessary files but could not go further. - murad30

    try the team

     codecept bootstrap