-- Sam Davey <[EMAIL PROTECTED]> wrote (on Tuesday, 29 July 2008, 07:53 AM -0700): > Thanks for the reply. I'm not using 'include' or 'include_once'. I am > using Zend_Loader which does this for you and I think it is via the > spl_autoload function although I haven't got too involved with the library > code for this. > > if I were including the files in the normal way then include_once would > certainly work. > > But due to the size of the system everything is being autoloaded as per the > Zend_Loader documentation. And it is Zend_Loader theat is not using the > correct function... > > but the unusual part is that it works now... its working locally and on the > production server. But at some point and without any code being changed it > will suddenly try to include it twice and cause the 'Cannot redeclare class > ' error. > > And when I restart apache the server the error will go away. > > Does anyone else know why Zend_Loader would be cauinf this problem?
My guess is that you're using an opcode cache of some sort; it would certainly explain why the apache reload helps (clears the opcode cache). -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/