在我的項目上使用dev mod後,我發現在OVH上產生了一些問題。 它顯示我一個空白頁!我試圖按照app.php上的問題,我發現問題仍然存在,執行$response = $kernel->handle($request);
,它不記錄prod。Symfony2.3生產頁面空白500
因此,當我更改app.php上的行:$kernel = new AppKernel('prod', false);
與$kernel = new AppKernel('dev', false);
它運作良好!
這裏是我的app.php
<?php
/*
* This file is part of the Sonata package.
*
* (c) Thomas Rabaix <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
umask(0000);
require_once __DIR__ . '/../app/bootstrap.php.cache';
require_once __DIR__ . '/../app/AppKernel.php';
//use Symfony\Component\HttpFoundation\Request;
// if you want to use the SonataPageBundle with multisite
// using different relative paths, you must change the request
// object to use the SiteRequest
use Sonata\PageBundle\Request\SiteRequest as Request;
$request = Request::createFromGlobals();
$kernel = new AppKernel('prod', false);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
編輯: 在開發和督促本地模式測試與
php app/console cache:clear --env=prod --no-debug
php app/console assets:install web_directory
php app/console assetic:dump web_directory
我應該添加或在我的項目安裝PHP5效果很好?
編輯: 我的項目包含:奏鳴曲項目,fosUserBundle等..
編輯
問題是在config_prod.xml
doctrine:
orm:
entity_managers:
default:
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver: apc
intil現在之後它返回一個錯誤500!爲什麼?由於apc未啓用! 所以我的問題如何啓用apc OVH親!
據我記得你必須'緩存:清除--env = prod' – 2014-10-19 03:52:29
你應該進入你的php.ini並打開顯示器。它會告訴你到底什麼是錯的。 – 2014-10-19 06:00:50
由於它是生產,你應該在php.ini中啓用php日誌,而不是顯示錯誤。 – SenseException 2014-10-19 10:01:32