繁体   English   中英

在FOSUserBundle注册期间出现白屏

[英]White screen during registration with FOSUserBundle

在/ register中发送表单后,我在同一页面中出现白屏。

我不知道该如何调试,不胜感激。

这是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 [] []

某处可能存在PHP错误。 请查看您的Apache error_log文件(大多数情况下,该文件位于/var/log/apache )。

如果没有Apache,请在php.ini中更改以下PHP设置:

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

检查var / log / apache2 / error.log中的Apache错误日志

显然,在生产模式下,Nginx,PHP或Symfony2不会记录一些错误。

我的解决方案是克隆该站点,并将其更改为app.php true:

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

因此,现在我有两个“生产”实例,一个实例为true,另一个实例为false。

错误是这样的:

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

您应该阅读http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html

我确定您忘记将DoctrineMongoDBBundle添加到app / AppKernel.php中的捆绑包中

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

    // ...
}

还检查您的供应商目录中适当的文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM