Composer install terminates with a fatal runtime exception

Issue #105 resolved
Quinlan M created an issue

When I try to install the API on my server, I make it to parameter configuration, but soon after I get a fatal PHP error in Symfony.

> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(211): Symfony\Component\Config\Util\XmlUtils::loadFile('/var/www/ataras...', Array)
#1 /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(39): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFile('/var/www/ataras...')
#2 /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(42): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load('web.xml')
#3 /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/MergeExtensionConfigurationPass.php(50): Symfony\Bundle\FrameworkBundle\DependencyInjection\FrameworkExtension->load(Array, Object(Symfony\Compon in /var/www/atarashii-api/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php on line 52
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception


  [RuntimeException]                                                         
  An error occurred when executing the "'cache:clear --no-warmup'" command.  


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

root@hatsune:/var/www/atarashii-api# 

Below is my basic PHP information

phpinfo()
PHP Version => 7.0.4-7ubuntu2.1

System => Linux hatsune 4.2.6-1-pve #1 SMP Thu Jan 28 11:25:08 CET 2016 x86_64
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/7.0/cli
Loaded Configuration File => /etc/php/7.0/cli/php.ini

Am I doing something wrong? There's very little documentation for the installation procedure and requirements. (It essentially says to run composer install and not much else)

Comments (4)

  1. Michael Johnson

    I thought we had a list of required PHP extensions, but it seems we do not.

    At the very least, you'll need the PHP dom extension. You will also need to make sure you have mbstring, intl and xml as well.

    This has not been tested on PHP7 yet, so I cannot speak to if you will encounter further issues.

  2. Quinlan M reporter

    Sorry for the late response, installing those extensions fixed it; however I ended up just using the official API as I had to cut features from my project (computer science culminating) so I just needed the anime data function.

  3. Log in to comment