迁移后symfony2错误500

时间:2012-06-14 15:36:31

标签: symfony

将网络迁移到在线服务器后,几乎每条路线都出现500错误。 我在xampp下开发了我的网站没有问题(网站工作在dev和prod)

我将网站放在指向我项目的网络文件夹的子域名(http://escritorio.gruposcout45.org.uy)下。

这是我的错误日志:

[2012-06-14 10:24:26] security.DEBUG: Read SecurityContext from the session [] []
[2012-06-14 10:24:26] security.DEBUG: Reloading user from user provider. [] []
[2012-06-14 10:24:26] security.DEBUG: Username "admin" was reloaded from user provider. [] []
[2012-06-14 10:24:26] request.INFO: Matched route "socio" (parameters: "_controller": "Caro\SociosBundle\Controller\SocioController::indexAction", "_route": "socio") [] []
[2012-06-14 10:24:26] request.CRITICAL: Twig_Error_Syntax: The function "knp_menu_render" does not exist in "::base.html.twig" (uncaught exception) at /home/neuronas/public_html/gruposcout45.org.uy/escritorio/vendor/twig/lib/Twig/Node/Expression/Function.php line 28 [] []
[2012-06-14 10:24:26] security.DEBUG: Write SecurityContext in the session [] []

我的自动加载器:

$loader->registerNamespaces(array(
   'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Sensio'           => __DIR__.'/../vendor/bundles',
    'JMS'              => __DIR__.'/../vendor/bundles',
    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
    'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib',
    'Doctrine'         => __DIR__.'/../vendor/doctrine/lib',
    'Monolog'          => __DIR__.'/../vendor/monolog/src',
    'Assetic'          => __DIR__.'/../vendor/assetic/src',
    'Metadata'         => __DIR__.'/../vendor/metadata/src',
    'Knp\\Component'   => __DIR__.'/../vendor/knp-components/src',
    'Knp\\Bundle'      => __DIR__.'/../vendor/bundles',
    'Knp\Menu'   => __DIR__.'/../vendor/KnpMenu/src',
));

提前致谢!

2 个答案:

答案 0 :(得分:2)

我没有把它放在我的AppKernel中:

new Knp\Bundle\MenuBundle\KnpMenuBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),

一旦我添加了这些行并清除了缓存,一切正常。 :)

答案 1 :(得分:0)

您是否正确安装了供应商?你有Knp \ Menu枝条功能的问题。