Ok so i have set up a new symfony3 project using :
我已经建立了一个新的symfony3项目,使用:
Vagrant----Virtualbox----PHP56----MYSQL55----UBUNTUTRUSTY64.
流浪汉——Virtualbox——PHP56——MYSQL55——UBUNTUTRUSTY64。
Everything was working correctly until i make a "composer update". I have this error message and i cannot do anything now
在我进行“编写器更新”之前,一切都运行正常。我有这个错误信息,现在什么也做不了。
Attempted to load class "DOMDocument" from the global namespace
尝试从全局名称空间加载“DOMDocument”类
So i found some proposed solution like "install php-xml" but it is already installed with newest version.
所以我找到了一些提议的解决方案,比如“安装php-xml”,但是它已经安装了最新的版本。
Does anyone have a solution or guide me to the right direction to find one
有没有人能给我一个解决方案或者指引我找到一个正确的方向
Many thanks
非常感谢
Nico
尼科
3 个解决方案
#1
60
Had the same issue with PHP 7.0.9, this worked:
对于PHP 7.0.9有同样的问题,这是有效的:
sudo apt-get install php7.0-xml
#2
20
You need to install the php-xml for your php version.
您需要为php版本安装php-xml。
If you have php 5.6. you need to install php5.6-xml. It seems the newest version does not work for older versions.
如果你有php 5.6。您需要安装php5.6-xml。最新版本似乎并不适用于旧版本。
sudo apt-get install php5.6-xml
sudo service apache2 restart
#3
5
even sudo apt-get install php-xml works. it takes the current version.
甚至sudo apt-get安装php-xml也能工作。它采用当前版本。
#1
60
Had the same issue with PHP 7.0.9, this worked:
对于PHP 7.0.9有同样的问题,这是有效的:
sudo apt-get install php7.0-xml
#2
20
You need to install the php-xml for your php version.
您需要为php版本安装php-xml。
If you have php 5.6. you need to install php5.6-xml. It seems the newest version does not work for older versions.
如果你有php 5.6。您需要安装php5.6-xml。最新版本似乎并不适用于旧版本。
sudo apt-get install php5.6-xml
sudo service apache2 restart
#3
5
even sudo apt-get install php-xml works. it takes the current version.
甚至sudo apt-get安装php-xml也能工作。它采用当前版本。