Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ClassNotFoundException Symfony

Tags:

php

symfony

I'm trying to make my website live but keep getting the same error...I've tried looking everywhere and using everyone solution with no luck.

Error

ClassNotFoundException: Attempted to load class "DestinationAppBundle" from namespace "Destination\AppBundle" in /home/dcms/public/html/dcms/apha/app/AppKernel.php line 19. Do you need to "use" it from another namespace?

AppKernel.php

    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 Destination\AppBundle\DestinationAppBundle(),
        new Destination\Auth\HashInterfaceBundle\DestinationHashInterfaceBundle(),
    );

File Structure

src
    Destination
        AppBundle

Any ideas?

like image 352
Brent Avatar asked Mar 13 '14 16:03

Brent


1 Answers

first: check if the file src\Destination\AppBundle\DestinationAppBundle.php does exist

second: open DestinationAppBundle.php and chek if the namespace is Destination\AppBundle

third: check if the classname declaration is the same as the filename (in your case : DestinationAppBundle)

like image 197
Milad Shahbazi Avatar answered Sep 18 '22 00:09

Milad Shahbazi