Because the previous version I used, works without any issues. Current PHP-Version: PHP 5.3.3-7 squeeze8 with Suhosin-Patch (cli) (built: Feb 10 2012 ) Apache/2.2.16 I've figured out the problem.
I hope for you that it work's no with the dotdeb repos. Notice: Trying to get property of non-object in app/cache on line 1211 Warning: Invalid argument supplied for foreach() in app/cache on line 1211 Notice: Trying to get property of non-object in app/cache on line 1225 Warning: Invalid argument supplied for foreach() in app/cache on line 1225 Fatal error: Class 'Doctrine\Common\Annotations\Annotation Registry' not found in app/on line 35 And after a few hours, without doing anything special, everything returns to normal, until the error reappears.
I've no experience with the new php versions from the dotdeb repo. What makes me create a bug is that, a little annoyed by this error, I completely deleted my project, downloaded the latest symfony version, re-installed my vendors to get back on a clean. I checked three times, the class Annotation Registry exists in my project.
Btw, i dug a little deeper, the Problem seems to be that classes defined in the class (like the universal class loader / apc class loader) can't write / read their own properties every 4th Requets (or so) - so the array of namespaces is empty, so he can't fine 'Doctrine\Common\Annotations\Annotation Registry' .
Yes that's the point it appears the first time in my case (without any apc cache...) It seems that there are to many classed to load for every request.
I have exactly the same problem with APCCache and sqlite installed and enabled.
Exact issue : Fatal error: Class 'Doctrine\Common\Annotations\Annotation Registry' not found in /path/to/site/app/on line 45 The weird thing is that it doesn't happen for days then start to happen really soon on short periods.
So if you have only a poor server for your app you've to use the Apc Cache Class Loader instead of Universal Class Loader...
I also tried to use the cache mechanism from Universal Class Loader but in my case without success.
@pdjcollins i know what you mean, luckily we saw the problem on the development servers before we went live, as a solution until you change the PHP Version could be to set the Max Requests Per Child in your apache Configuration lower then I've just experienced the same issue just a few hours after launching the new version migrated under Symfony of my website... I've upgraded php5 to the squeeze9 and for now the problem has disappeared, but I'm not sure it will not come back again (maybe it's just the apache reload that has "fixed" the issue). With previouse php (5.3.2) version this issue doesn't occured.
Does anyone has an other solution than switching to the deb0 package? But it's not available anymore in any package repository for debian or centos.
Im not sure but I think I've read somewhere that zend optimizer is recommended to work with apc-cache correctly. Before I tried without zend-optimizer, the same error occurs.