I'm trying to start working in a new (Windows 8) laptop in an existing project that works fine in my previous (Mac OS X) machine and in all the (Linux) servers it's been deployed to.
I've cloned from git, run the composer, app/console works fine, I've set the config files properly, created the database and checked that the DB schema was OK, cleared cache, etc etc as I've done a thousand times before.
But now I'm getting an error I've never faced before, and I don't know if it has to do with updated dependencies that might not necessarily use the exact same versions than before, or just that I'm kind of new working on Windows environments:
[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()
之类的方法之一发送标头或响应
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.