Recently, I was getting the error
Warning: session_start() [function.session-start]: Function spl_autoload_call() hasn’t defined the class it was called for in…
In my particular case, the problem stemmed from defining a deserialization function using
ini_set(’unserialize_callback_func’, ’spl_autoload_call’)
(well, symfony defines it)
In the process of deserializing an object, it tried to instantiate a class which hadn’t yet been loaded. The autoloader wasn’t able to find the class and the spl autoload functionality therefore croaked.
The problem was that I had defined a property inside of one my model objects that referenced the sfWebRequest. This property should never have been serialized. Infact, only the properties of the object as defined in model should get serialized. The fix was defined a __sleep method in the model.
public function __sleep()
{
return MySampleObjectPeer::getFieldNames(BasePeer::TYPE_FIELDNAME);
}
Replace MySampleObjectPeer with the appropriate peer class.