私のプロジェクトで dev mod を使用した後、OVH の prod に問題があることがわかりました。空白のページが表示されます。私はapp.phpの問題を追跡しようとしましたが、問題がの実行で持続し、$response = $kernel->handle($request);
prodにログオンしていないことがわかりました。
したがって、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 <thomas.rabaix@sonata-project.org>
*
* 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を追加またはインストールする必要がありますか?
編集: 私のプロジェクトには次が含まれます:sonata-project、fosUserBundleなど...
編集
問題はconfig_prod.xmlにありました
doctrine:
orm:
entity_managers:
default:
metadata_cache_driver: apc
query_cache_driver: apc
result_cache_driver: apc
エラー500を返した後、今まで!なぜ ?apcが有効になっていないためです!OVH pro で apc を有効にする方法について質問です。