Symfony2: The session id is too long or contains illegal characters

点点圈 提交于 2021-01-29 15:31:17

问题


I always get this error when I have some time without updating a project, only occurs in the development environment.

Warning: session_start() [function.session-start]: The session id contains illegal characters, valid characters are a-z, A-Z, 0-9 and '-,'

How to avoid? or Why does this happen?

i use:

  • Symfony 2.0.9
  • Linux Mint 12 3.0.0-14-generic x86_64
  • PHP 5.3.6-13ubuntu3.3

回答1:


You might be using Mink or Behat. Please, make sure that they are loaded only for their environment and not dev/prod. See:

https://github.com/symfony/symfony/issues/1766




回答2:


Delete your browser cookies. It fixed the error for me



来源:https://stackoverflow.com/questions/8811222/symfony2-the-session-id-is-too-long-or-contains-illegal-characters

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!