Weird symfony error
This error popped up today just when I wanted to go home, and I really didn't know what to do at first.
Warning: session_start() [function.session-start]: Function spl_autoload_call() hasn't defined the class it was called for in…
I just googled it and thankfully someone else had encountered the same issue. Had I thought about it for a minute, it probably would come to me because it's entirely logical. "spl_autoload_call()" is the function symfony defines to load classes on demand. The error message indicates that the function returned without defining (via include) the class it was called to define, and that this happen during session_start, i.e. when the session data is being deserialized. Symfony creates and caches an assosiative array of all class files that apply to a given application context, instead of trying to find classes on the fly or guess their location. What happened in my case was that I hadn't defined the different session cookie names for two different applications correctly. In one application I had an object in the session which class was specific to that application. Then I switched to the other application, it tried to deserialize the same session instead of creating a new one and was unable to find the class of that object. Hence the error message.