2012-08-14 52 views
0

在/ register中發送表單後,我在同一頁面出現白屏。使用FOSUserBundle註冊時出現白屏

我不知道如何調試這個,任何幫助表示讚賞。

這裏的prod.log文件(我配置了action_level爲 '調試'):

[2012-08-14 05:32:20] request.INFO: Matched route "fos_user_registration_register" (parameters: "_controller": "Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction", "path": "/register/", "permanent": "true", "scheme": "null", "httpPort": "80", "httpsPort": "443", "_route": "fos_user_registration_register") [] [] 
[2012-08-14 05:32:20] security.INFO: Populated SecurityContext with an anonymous Token [] [] 
[2012-08-14 05:32:20] security.DEBUG: Write SecurityContext in the session [] [] 
[2012-08-14 05:32:20] request.INFO: Matched route "fos_user_registration_register" (parameters: "_controller": "FOS\UserBundle\Controller\RegistrationController::registerAction", "_route": "fos_user_registration_register") [] [] 
[2012-08-14 05:32:20] security.INFO: Populated SecurityContext with an anonymous Token [] [] 
[2012-08-14 05:32:20] security.DEBUG: Write SecurityContext in the session [] [] 
[2012-08-14 05:32:38] request.INFO: Matched route "fos_user_registration_register" (parameters: "_controller": "FOS\UserBundle\Controller\RegistrationController::registerAction", "_route": "fos_user_registration_register") [] [] 
[2012-08-14 05:32:38] security.INFO: Populated SecurityContext with an anonymous Token [] [] 

回答

0

顯然在生產模式下,有些錯誤不會被Nginx,PHP和Symfony2記錄。

我的解決辦法就是克隆網站,並在app.php更改爲true:所以現在我有兩個「生產」的情況下,一個具有真正的和其他與假

$kernel = new AppKernel('prod', true); 

錯誤是這樣的:

Fatal error: Class 'Mongo' not found in /some/doctrine/file 
0

有可能是一個PHP錯誤的地方。請查看您的Apache error_log文件(大部分時間位於/var/log/apache)。

如果你沒有了Apache,在php.ini更改以下PHP設置:

display_errors Off 
log_errors On 
error_log=/var/log/php_errors.log 
+0

我沒有使用apache,我正在使用nginx。並且nginx.error.log中沒有錯誤 – ChocoDeveloper 2012-08-14 09:33:03

+0

擴展我的答案如何更改PHP錯誤日誌記錄 – chiborg 2012-08-14 09:49:01

0

檢查Apache的錯誤日誌中無功/日誌/的Apache2/error.log中

+0

我沒有使用apache,我正在使用nginx。並且nginx.error.log中沒有錯誤 – ChocoDeveloper 2012-08-14 09:32:15

0

你應該閱讀http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html

我確信,你忘了DoctrineMongoDBBundle添加到您的應用程序包/ AppKernel.php

// app/AppKernel.php 
public function registerBundles() 
{ 
    $bundles = array(
     // ... 
     new Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle(), 
    ); 

    // ... 
} 

也檢查供應商目錄中的適當文件