I am getting the following error in apache:
[notice] child pid 13190 exit signal Segmentation fault (11)
and it only seems to be happening when I try to echo, var_dump, etc… the $data variable in my session write function. Anything thing that is strange is that if I don’t try to var_dump $data with this code:
if($this->read($id) == '')
{
$this->sessionCollection->insert($data, array('safe' => true));
}
else
{
$this->sessionCollection->update(array('_id' => $data['_id']), $data, array('safe' => true));
}
php throws:
Warning: MongoCollection::insert() expects parameter 1 to be an array
or object
Anyone know what might be causing this?
Apparently if you use exit() in the write method of a session write handler, the segfault is a normal outcome. I put in the exit because I wanted to see the $data variable because it did not look like the data was saving properly. Now that I know the $data variable is a strng of a serialized array, it seems to be work fine.