Installation FAQs

Last updated on
11 March 2021

This documentation needs work. See "Help improve this page" in the sidebar.

Installation

Q. When I run php composer.phar install I get the following output ... what gives?


Loading composer repositories with package information Installing dependencies from lock file [Exception] DateTime::__construct(): It is not safe to rely on the system's timezone se ttings. You are *required* to use the date.timezone setting or the date_def ault_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone id entifier. We selected the timezone 'UTC' for now, but please set date.timez one to select your timezone. 

A. Like the exception hints at, but never really says, edit the timezone setting in your php.ini

It should look something like:


[Date] ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = America/Los_Angeles

See http://php.net/manual/en/timezones.php for a full list of timezones.

Q. Trying to run tests, I get the following exception. Why?


[RuntimeException] Can not import config "behat.local.yml": file not found. 

A. You must copy behat.local.yml.example to behat.local.yml

This file is never committed to the Git repository and holds passwords for test users as well as local configuration settings.

Note: You must open an issue in the queue to get the passwords necessary to run authenticated tests. We'll send you a link to a behat.local.yml - there isn't a long wait. We just need to keep the passwords out of the reach of spiders and spammers.

Q. Some tests run, but then I get this notice. What's up?

Notice: Use of undefined constant CURLOPT_FOLLOWLOCATION - assumed 'CURLOPT_FOLLOWLOCATION' in phar://mink.phar/vendor/fabpot/goutte/Goutte/Client.php line 117.

A. PHP must have the cURL libraries installed

Ubuntu: sudo apt-get install php5-curl
Windows: edit the php.ini and uncomment ;extension=php_curl.dll by removing the semicolon.

On Ubuntu 16.04, php5 is replaced with php7. Run the following command to make it work on Ubuntu 16.04

sudo apt-get install php7.0-*-curl

Q. Why do I see this DOMDocument error when I try to run tests?

PHP Fatal error: Class 'DOMDocument' not found in '/some/local/path/symfony/dependency'-injection/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php on line 211

You're missing the php-xml libraries.

Redhat: yum install php-xml

Q. Why do I see this undefined function error when I try to run tests?


PHP Fatal error: Call to undefined function Behat\Behat\DependencyInjection\mb_internal_encoding() in /some/local/path/vendor/behat/behat/src/Behat/Behat/DependencyInjection/BehatExtension.php on line 54 

You're missing the php mbstring library.

Redhat: yum install php-mbstring

Q. Some tests run, but then I see the following Curl error:


[WebDriver\Exception\CurlExec] Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::beforeScenario() Curl error thrown for http POST to http://localhost:4444/wd/hub/session$s couldn't connect to host

You can't just install selenium.

You need to have selenium running on the system that runs your tests for all feature/scenarios tagged with @javascript!
java -jar yourseleniumjarfile.jar

Q. On the Mac, some tests fail with the following message:


[WebDriver\Exception\UnknownError] Exception has been thrown in "beforeScenario" hook, defined in FeatureContext::beforeScenario() Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC ...

Firefox must appear in the binary path for the Selenium process.

You must not only install Firefox but make sure that it can be launched by typing `firefox` into a Terminal window.

  • Use echo $PATH to find out which directories are in your $PATH.
  • Install Firefox if you haven't already.
  • Find the Firefox binary, wherever it is installed. On a typical Mac, you might find it at /Applications/Firefox.app/Contents/MacOS/firefox-bin.
  • Pick a directory in your $PATH (/usr/local/bin is a decent choice) and make a symbolic link named firefox from there to your Firefox binary, like this:
    
    
    sudo ln -s /Applications/Firefox.app/Contents/MacOS/firefox-bin /usr/local/bin/firefox 

Help improve this page

Page status: Needs work

You can: