I have a symfony2 application on my local computer with ubuntu and it works well, but it does not work on a server with CentOS and Cpanel, I got this error:
The class "Propa \ PageBundle \ Entity \ Page" is not a valid entity or the super class is mapped.
CRITICAL - Doctrine \ ORM \ Mapping \ MappingException: Class "Propa \ PageBundle \ Entity \ Page" is not a valid entity or mapped super class. (uncaught exception) in / home / estudi 83 / domains / serverprova.com.es / propa / vendor / doctrine / orm / lib / Doctrine / ORM / Mapping / MappingException.php line 216
I prove:
$page=$em->getRepository('PropaPageBundle:Page')->findOneBy(array('codi'=>'0001'));
And get this error: Unknown Entity namespace alias 'PropaPageBundle'.
And I prove:
$page=$em->getRepository('Propa\PageBundle\Entity\Page')->findOneBy(array('codi'=>'0001'));
And get the same error: Class "Propa\PageBundle\Entity\Page" is not a valid entity or mapped super class.
This is the object:
<?php
namespace Propa\PageBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Propa\PageBundle\Util;
use Gedmo\Mapping\Annotation as Gedmo;
class Page {
protected $id;
I have proven:
auto_mapping: true
and
auto_mapping: false
mappings:
PageBundle: ~
But always get the same error.
What can I do?
UPDATE: eAccelerator symfony2, eAccelerator APC !!