I typed the following command to synchronize the database
php bin/console doctrine:database:create
But it returned me the following error message :
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DOMDocument" from the global namespace. Did you forget a "use" statement? in /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52 Stack trace: 0 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(261): Symfony\Component\Config\Util\XmlUtils::loadFile('/opt/lampp/htdo...', Array) 1 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM('/opt/lampp/htdo...') 2 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(58): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load('web.xml') 3 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Comp in /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php on line 52
Does someone know how to solve this issue ? Thank's :)
EDIT
I ran composer install as Benjamin told me to do and it returned me this :
> 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'" c
ommand:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\Class
NotFoundException: Attempted to load class "DOMDocument" from the
global namespace.
Did you forget a "use" statement? in /opt/lampp/htdocs/linguavel/v
endor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.p
hp:52
Stack trace:
#0 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/
Component/DependencyInjection/Loader/XmlFileLoader.php(261): Symfo
ny\Component\Config\Util\XmlUtils::loadFile('/opt/lampp/htdo...',
Array)
#1 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/
Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfon
y\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToD
OM('/opt/lampp/htdo...')
#2 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/
Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(
58): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->l
oad('web.xml')
#3 /opt/lampp/htdocs/linguavel/vendor/symfony/symfony/src/Symfony/
Component/DependencyInjection/Comp in /opt/lampp/htdocs/linguavel/
vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.
php on line 52
.
NEW EDIT :
When I type composer update it returns me this :
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-mysqli.ini
- /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
composer installand retry ?