Exception thrown without a stack frame in Unknown on line 0
We got this tricky error a few days before a big deadline (typical) "Exception thrown without a stack frame in Unknown on line 0"
We were able to find the cause thanks to others who have posted about this problem.
Basically after php has finished executing something went wrong.
For us it turns out a SimpleXML node was persisted in the session and that caused the session save to fail.
We debugged the problem using php session_encode() which converts the session to a string which we then echo-ed and we saw "SimpleXMLElement":0:{}" in the string (bad).
SimpleXMLElement is a reference and you can't store that in session. In our case we should never have stored it in the session in the first place so we just deleted that code, but if you had to put into session then you should convert it to a simple type first e.g. cast to string (string).
Hope this helps you as others helped us!
We were able to find the cause thanks to others who have posted about this problem.
Basically after php has finished executing something went wrong.
For us it turns out a SimpleXML node was persisted in the session and that caused the session save to fail.
We debugged the problem using php session_encode() which converts the session to a string which we then echo-ed and we saw "SimpleXMLElement":0:{}" in the string (bad).
SimpleXMLElement is a reference and you can't store that in session. In our case we should never have stored it in the session in the first place so we just deleted that code, but if you had to put into session then you should convert it to a simple type first e.g. cast to string (string).
Hope this helps you as others helped us!
Comments
Post a Comment