Para corrigir esse problema, instalei os seguintes pacotes:
apt install libapache2-mod-php7.1 php7.1 php7.1-cli php7.1-json php7.1-opcache php7.1-readline php7.1-intl php7.1-xml
Instalei o php7 no Ubuntu 16.04 e instalei o Symfony também, mas quando tento executar o servidor na minha linha de comando, ele mostra este erro:
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 /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php:52
Stack trace:
#0 /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(284): Symfony\Component\Config\Util\XmlUtils::loadFile('/home/kanat/Doc...', Array)
#1 /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php(41): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->parseFileToDOM('/home/kanat/Doc...')
#2 /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php(57): Symfony\Component\DependencyInjection\Loader\XmlFileLoader->load('web.xml')
#3 /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection in /home/kanat/Documents/deneme/vendor/symfony/symfony/src/Symfony/Component/Config/Util/XmlUtils.php on line 52
Quando eu executo o comando php bin/console server:run
, ele gera o erro acima.
Para corrigir esse problema, instalei os seguintes pacotes:
apt install libapache2-mod-php7.1 php7.1 php7.1-cli php7.1-json php7.1-opcache php7.1-readline php7.1-intl php7.1-xml