繁体   English   中英

无法启动会话,因为标头已经在第0行的“”处发送了。n / a

[英]Failed to start the session because headers have already been sent by “” at line 0. at n/a

我正在尝试在现有项目中的新(Windows 8)笔记本电脑中开始工作,该笔记本在我以前的(Mac OS X)计算机以及已部署到的所有(Linux)服务器中都可以正常工作。

我已经从git中克隆了,运行了composer,app / console工作正常,我已经正确设置了配置文件,创建了数据库,并检查数据库架构是否正常,清除了缓存等,因为我已经完成了一千次以前的时间。

但是现在我遇到了一个我从未遇到过的错误,而且我不知道这是否与更新的依赖关系有关,后者可能不一定使用与以前完全相同的版本,或者只是我是一个新人在Windows环境中工作:

[1] RuntimeException: Failed to start the session because headers have already been sent by "" at line 0.
at n/a
    in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 103

at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
    in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 183

at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
    in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 475

at Symfony\Component\HttpFoundation\Session\Session->has('_security.last_error')
    in C:\Users\David\Sites\my-project\vendor\friendsofsymfony\user-bundle\FOS\UserBundle\Controller\SecurityController.php line 28

at FOS\UserBundle\Controller\SecurityController->loginAction(object(Request))
    in  line 

at call_user_func_array(array(object(SecurityController), 'loginAction'), array(object(Request)))
    in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2841

at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
    in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2815

at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
    in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2944

at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
    in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2245

at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
    in C:\Users\David\Sites\my-project\web\app_dev.php line 29

检查是否所有自定义类都重写了HttpKernel中的类,例如Bundle类是否没有从boot()之类的方法之一发送标头或响应

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM