我在CentOS 6 docker container的PHP版7.0.3
上运行symfony 3.0.2。当我尝试访问索引页面时,我在error_log
中收到以下错误/警告,我并不理解:
PHP Warning: DOMElement::setAttribute(): Not yet implemented in <path>/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php on line 304
当我从cli运行php bin/console server:start
甚至php bin/console --version
时,我得到以下输出:
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: DOMElement::setAttribute(): Not yet implemented
在此docker容器中加载的xdebug.ini
中,xdebug.auto_trace = 1
似乎是个问题。将其设置为0
或删除它(默认= 0)可以解决它。
来自xdebug docs:
xdebug.auto_trace 类型:布尔值,默认值:0 当此设置设置为on时,将在脚本运行之前启用函数调用的跟踪。这样就可以跟踪auto_prepend_file中的代码。
类似的问题,没有解释(帮助解决这个问题):http://www.phpdocx.com/en/forum/default/topic/985#post_3587
有人可以解释一下这些错误是如何造成的(大概是auto_prepend_file)?