symfony prod debug=true , get blank page.



i have a symfony2 project works well, after some modification of html, i always get a blank page when i set in app.php:
$kernel = new AppKernel('prod', false);
but if i set the debug parameter to true:
$kernel = new AppKernel('prod', true);
everything works fine, i haven't see any log in my prod.log. I use php apc and fastCGI on my server. Anyone can tell me the difference between the parameter? Or this is just a problem of cache?



finally, i have found the problem. I searched again in my log of appache, i got this error: 

[Fri Oct 26 14:12:19 2012] [error] [client 127.0.0.1] PHP Fatal error: require() [function.require]: Failed opening required 'D:/workspace/symfony_bannieres/app/cache/devprod/doctrine/orm/Proxies\AcmeModerationBundleEntityModerationObjectStatusProxy.php' (include_path='.;d:\software\wamp\bin\php\php5.3.9\pear') in D:\workspace\symfony_bannieres\vendor\doctrine\lib\Doctrine\ORM\Proxy\ProxyFactory.php on line 85

ok, that means i do not have the entity proxy file. I check this file in the dev env, it exist. so i figure out which is a problem of my entity class. I found in my entity class where exists a un defined relationship,
 /**
 * @var AddepiUser
 *
 * @ORM\ManyToOne(targetEntity="AddepiUser")
 * @ORM\JoinColumns({
 *   @ORM\JoinColumn(name="addepi_user_id", referencedColumnName="id")
 * })
 */
private $addepiUser;
in fact i do not have this entity. so i removed this one and use
php app/console cache:warmup --env=prod --no-debug
to warm up the prod env. everything works just fine.

评论

热门博文