I think I've tracked down WHERE the problem is occurring, but I still have no idea why. In application/modules/default/controllers/ my index controller looks like this:

class indexController extends Fs_Controller_Action
{
        
        public function init()
        {
                parent::init();
        }
        
        public function indexAction()
        {
                ...

I've found that the "parent::init()" instruction actually runs, but nothing after that does; which seems strange to me.

Fs_Controller_Action resides in library/Fs/Controller/ and looks like:

class Fs_Controller_Action extends Zend_Controller_Action
{
        private $_moduleDir;
        
        public function init()
        {
$this->_moduleDir = $this->getFrontController()->getModuleDirectory($this->getRequest()->getModuleName());
                
                
                Zend_Registry::set('Zend_Locale', new Zend_Locale());
        }
        ...

None of the code is changing the include path, or including the same class multiple times...

Another thought that's occurred to me is: could this be due to an incompatibility between PHP 5.3 and ZF's autoloader?

Matthew Weier O'Phinney wrote:
-- Steven Szymczak <sc.szymc...@googlemail.com> wrote
(on Wednesday, 16 September 2009, 08:17 PM +0900):
When I upgraded by development environment to OS X 10.6 (Snow Leopard) it also automatically upgraded my PHP install to 5.3, and this seems to have broken something within ZF.

Previously, everything was working as expected. The production site code is perfectly in sync with that on the development side as I haven't made any changes in the last 3 weeks (which was also before I upgraded to Snow Leopard). Now I'm getting the following error on the development side:

Fatal error: Cannot redeclare class Fs_Controller_Action in /Users/Steven/Sites/farstrider.eu/library/fs/Controller/Action.php on line 41

While the production side continues to function (PHP 5.2.9).

Any ideas on how to fix this?

We ran across similar issues when getting ZF 1.9 ready for PHP 5.3. In
most cases, there was code that was changing the include_path, and PHP
then managed to include the same file twice. Find where the include_path
changes, and you can fix the issue.


--
スティーブン

Reply via email to