session_start Throws Fatal Error

前端 未结 3 532
醉话见心
醉话见心 2021-01-29 03:04

I\'m currently working on a small CMS for my website and I\'m getting following error when calling session_start() :

Fatal error: Exception thrown withou

相关标签:
3条回答
  • 2021-01-29 03:47

    You cannot store resources (a PDO object is actually a resource) in a session. On reinitialisation this is broken and throws an exception 'outside' the scope of your PHP file.

    0 讨论(0)
  • 2021-01-29 03:59

    You're probably throwing an exception from a destructor of from an exception handler.


    Resources :

    • Solving "Fatal error: Exeption thrown without a stack frame in unknown on line 0"

    On the same topic :

    • Zend session_start gives Fatal error: Exception thrown without a stack frame in Unknown on line 0
    • How do I track down an “Exception thrown without a stack frame in Unknown on line 0” in PHP?
    0 讨论(0)
  • 2021-01-29 04:01

    So, as I was told, saving a PDO object in the session does invoke that error. I used a workaround, I'm now setting up da connection for each request, instead of storing connections in the session.

    Thanks for your help !

    0 讨论(0)
提交回复
热议问题