【发布时间】:2016-01-12 07:56:42
【问题描述】:
我在我的 symfony2-project (2.6.*) 中使用 dompdf-bundle (slik/dompdf-bundle) 从 html 生成 pdf。这在我的开发环境(MAMP)中的开发(app_dev.php)和产品模式中运行良好。
在 prod 环境中,我得到一个完全相同的数据 (DB) 和代码 (GIT) 的错误。所以我检查了服务器的配置(PHP版本)。有趣:当我使用 app_dev.php 运行 prod-envirenment 时,生成工作正常!!! app.php 和 app_dev.php 的区别在哪里?
我得到的错误: Error message in german
我的 AppKernel.php:
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new GaertnerhuusBundle\GaertnerhuusBundle(),
new GaertnerhuusAdminBundle\GaertnerhuusAdminBundle(),
new Slik\DompdfBundle\SlikDompdfBundle()
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
【问题讨论】:
-
您是否为开发环境添加了捆绑包?请告诉我们你加载包的位置:AppKernel.php
-
@ibasaw 查看更新后的描述,感谢您的支持。
-
你得到什么错误?