Symfony2-$query-getResult()在prod环境中返回空白页
我最近重新安装了我的供应商Symfony2-$query-getResult()在prod环境中返回空白页,symfony,bundles,Symfony,Bundles,我最近重新安装了我的供应商 php app/bin vendors install --reinstall 从那时起,在我的prod环境中,我在任何时候都会得到一个空白页(不是错误) echo "1"; $array = $query->getResult(); echo "2"; 它输出一个空白页,其中包含: 1 但是在开发环境中一切都正常运行。。。我确实试图清除缓存,但仍然在PROD环境中获得空白页。 我尝试使用var_dump($qu
php app/bin vendors install --reinstall
从那时起,在我的prod环境中,我在任何时候都会得到一个空白页(不是错误)
echo "1";
$array = $query->getResult();
echo "2";
它输出一个空白页,其中包含:
1
但是在开发环境中一切都正常运行。。。我确实试图清除缓存,但仍然在PROD环境中获得空白页。
我尝试使用var_dump($query),它出现在两种环境中,唯一的区别似乎是
// prod
private '_proxyDir' => string 'C:\wamp\www\AppName\app/cache/prod/doctrine/orm/Proxies' (length=55)
// dev
private '_proxyDir' => string 'C:\wamp\www\AppName\app/cache/dev/doctrine/orm/Proxies' (length=54)
这是我的deps文件:
[symfony]
git=http://github.com/symfony/symfony.git
version=v2.0.9
[twig]
git=http://github.com/fabpot/Twig.git
version=v1.5.1
[monolog]
git=http://github.com/Seldaek/monolog.git
version=1.0.2
[doctrine-common]
git=http://github.com/doctrine/common.git
version=2.1.4
[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.1.5
[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.1.5
[swiftmailer]
git=http://github.com/swiftmailer/swiftmailer.git
version=v4.1.5
[assetic]
git=http://github.com/kriswallsmith/assetic.git
version=v1.0.2
[twig-extensions]
git=http://github.com/fabpot/Twig-extensions.git
[metadata]
git=http://github.com/schmittjoh/metadata.git
[SensioFrameworkExtraBundle]
git=http://github.com/sensio/SensioFrameworkExtraBundle.git
target=/bundles/Sensio/Bundle/FrameworkExtraBundle
version=origin/2.0
[JMSSecurityExtraBundle]
git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
version=origin/1.0.x
[SensioDistributionBundle]
git=http://github.com/sensio/SensioDistributionBundle.git
target=/bundles/Sensio/Bundle/DistributionBundle
version=origin/2.0
[SensioGeneratorBundle]
git=http://github.com/sensio/SensioGeneratorBundle.git
target=/bundles/Sensio/Bundle/GeneratorBundle
version=origin/2.0
[AsseticBundle]
git=http://github.com/symfony/AsseticBundle.git
target=/bundles/Symfony/Bundle/AsseticBundle
version=v1.0.1
[FOSUserBundle]
git=git://github.com/FriendsOfSymfony/FOSUserBundle.git
target=bundles/FOS/UserBundle
[FOSFacebookBundle]
git=git://github.com/FriendsOfSymfony/FOSFacebookBundle.git
target=/bundles/FOS/FacebookBundle
version=origin/2.0
[FacebookSDK]
git=git://github.com/facebook/php-sdk.git
target=/facebook
[FOSCommentBundle]
git=https://github.com/FriendsOfSymfony/FOSCommentBundle.git
target=bundles/FOS/CommentBundle
[FOSRestBundle]
git=git://github.com/FriendsOfSymfony/FOSRestBundle.git
target=bundles/FOS/RestBundle
version=origin/2.0
[JMSSerializerBundle]
git=git://github.com/schmittjoh/JMSSerializerBundle.git
target=bundles/JMS/SerializerBundle
有什么想法,如何调试吗?我认为您必须使用以下命令预热prod cache并重新生成代理:
./app/console cache:warmup --env=prod --no-debug
我认为您必须使用以下命令预热prod cache并重新生成代理:
./app/console cache:warmup --env=prod --no-debug
我刚刚删除了prod.log,刷新了我的空白页面,app/logs中什么也没有发生……然后在app.php(或另一个生产索引文件)中更改行
$kernel=new-AppKernel('prod',false)
到$kernel=new-AppKernel('prod',true)代码>并查看是否发生了什么。这将启用显示错误,因此请确保在修复产品后禁用它。@meze我将其设置为true,刷新我的页面,然后将其设置为false,我不再有此空白页面。。。有点奇怪。谢谢我刚刚删除了prod.log,刷新了我的空白页面,app/logs中什么也没有发生……然后在app.php(或另一个生产索引文件)中更改行$kernel=new-AppKernel('prod',false)
到$kernel=new-AppKernel('prod',true)代码>并查看是否发生了什么。这将启用显示错误,因此请确保在修复产品后禁用它。@meze我将其设置为true,刷新我的页面,然后将其设置为false,我不再有此空白页面。。。有点奇怪。谢谢