这是一个很难解决的问题。在任何错误类型上,页面都有可能因分段故障[Fri Apr 25 17:45:52.141251 2014] [core:notice] [pid 23298] AH00052: child pid 23367 exit signal Segmentation fault (11)
而崩溃。
我在symfony framework 2.5上运行,有一个基本的页面路由和一个使用Request对象的控制器。
路线
form_core_page_loader_homepage:
path: /
defaults: { _controller: FormCorePageLoaderBundle:Default:index }
控制器
use Symfony'Component'HttpFoundation'Request;
// this controller extends Symfony's and adds getStore() function and some others...
use FormCore'PageLoaderBundle'Controller'SessionStoreController as Controller;
use FormCore'PageLoaderBundle'Controller'StyleSessionStoreControllerTrait;
class DefaultController extends Controller
{
use StyleSessionStoreControllerTrait;
public function indexAction(Request $request)
{
$store = $this->getStore();
if (!$store->initRequest($request)) {
throw $this->createNotFoundException('That page does not exist.');
}
// grab our vars for the template...
$templateVars = $this->getIndexVars();
....
}
protected functionIndexVars()
{
// this is where it goes kaboom
$noticeErrorHere = $crashesWSegFault;
....
}
}
有人遇到过与symfony相似的东西吗?我的猜测是,它捕捉到的错误导致了一个问题,尽管很难用seg故障进行故障排除。。。
尽管Symfony 2.5将在接下来的几周内发布,但我还是回到了2.4版本,这似乎解决了问题。