Iam new with php and creating an rest API for test purposals (for an android app). I use doctrine as ORM for my PHP project and it works fine localy with XAMPP.
Since i uploaded the project to an external hosting provider i got constantly an error:
[18-Feb-2016 10:25:12 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Class 'Doctrine\Common\Collections\ArrayCollection' not found in /home/aaapi/public_html/src/Alert.php:40
Stack trace:
#0 /home/aaapi/public_html/dataManagers/AlertManager.php(60): DemoApi\src\Alert->__construct('heerlen', Object(DemoApi\src\Child))
#1 /home/aaapi/public_html/create_alert.php(22): DemoApi\dataManagers\AlertManager->createAlert('heerlen', Array)
#2 {main}
thrown in /home/aaapi/public_html/src/Alert.php on line 40
I EXACLY followed http://doctrine-orm.readthedocs.org/projects/doctrine-orm/en/latest/reference/association-mapping.html 5.5. (one to many bi directional)
I tried to remove
use Doctrine\Common\Collections\ArrayCollection;
and replace the:
$this->children = new ArrayCollection();
//replaced by
$this->children = new Doctrine\Common\Collections\ArrayCollection();
This also doesn't fix the problem.
Has someone a solution?