Php Symfony 2 FosUserBundle:“一个;500内部服务器错误“;

Php Symfony 2 FosUserBundle:“一个;500内部服务器错误“;,php,symfony,fosuserbundle,Php,Symfony,Fosuserbundle,我在尝试使用Symfony II生产模式访问我的网站时遇到此错误(它在开发模式下工作) SF日志错误: 关键的 在链中找不到类“Camplica\UserBundle\Entity\User” 已配置名称空间FOS\UserBundle\Entity。我无法创建我的网站 工作 当我使用开发模式访问我的网站时,它工作得很好,但在使用生产模式时它不工作。 我不能解决我的问题,我看不出它是从哪里来的 app/config/routing.yml camplica_home: resource:

我在尝试使用Symfony II生产模式访问我的网站时遇到此错误(它在开发模式下工作)

SF日志错误: 关键的

在链中找不到类“Camplica\UserBundle\Entity\User” 已配置名称空间FOS\UserBundle\Entity。我无法创建我的网站 工作

当我使用开发模式访问我的网站时,它工作得很好,但在使用生产模式时它不工作。 我不能解决我的问题,我看不出它是从哪里来的

app/config/routing.yml

camplica_home:
    resource: "@CamplicaHomeBundle/Resources/config/routing.yml"
    prefix:   /CamPlica

fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /CamPlica/profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /CamPlica/register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /CamPlica/resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /CamPlica/change-password
# Internal routing configuration to handle ESI
#_internal:
#    resource: "@FrameworkBundle/Resources/config/routing/internal.xml"
#    prefix:   /_internal
Camplica/UserBundle/Entity/User.php

<?php
// src/Sdz/UserBundle/Entity/User.php

namespace Camplica\UserBundle\Entity;

use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="Camplica_user")
 */
class User extends BaseUser
{

//....

}
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    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 JMS\AopBundle\JMSAopBundle(),
            new JMS\DiExtraBundle\JMSDiExtraBundle($this),
            new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
            **new Camplica\UserBundle\CamplicaUserBundle(),**
            new Camplica\HomeBundle\CamplicaHomeBundle(),
            new FOS\UserBundle\FOSUserBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
}

您清除了产品环境的缓存了吗?@Ferhad是的,我又清除了一次以确保。。同样的错误。请在路线中使用小号大写字母。