Zend Framework

Bootstrapping modules leads to a infinite loop in PuginLoader class

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: 1.9.2
  • Component/s: Zend_Loader
  • Labels:
    None

Description

Hello,

I am using a modular structure in my application to separate the public part of the application from the administrative part of the application.

My modules reside in application/modules directory (folder structure created using Zend_Tool) which looks like this:

application
--modules
----admin
------models
------controllers
------views
------Bootstrap.php
----public
------models
------controllers
------views
--Bootstrap.php

My application.ini file from application/configs has the following lines:

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0

includePaths.library = APPLICATION_PATH "/../library"

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"

autoloaderNamespaces.artistcb = "ArtistCB_"

resources.db.adapter = "pdo_mysql"
resources.db.isDefaultTableAdapter = true
resources.db.params.host = "localhost"
resources.db.params.username = "xxx"
resources.db.params.password = "xxx"
resources.db.params.dbname = "xxx"
resources.db.params.charset = "UTF8"

resources.frontController.moduleControllerDirectoryName = "controllers"
resources.frontController.moduleDirectory = MODULES_PATH
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "public"
resources.frontController.env = APPLICATION_ENV

resources.layout.layoutPath = MODULES_PATH "/public/views/layouts/scripts"
resources.layout.pluginClass = "ArtistCB_Layout_Controller_Plugin_Layout"

resources.view = ""

resources.modules.default =
resources.modules.admin =

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

An empty class called Admin_Bootstrap exists in a file Bootstrap.php in application/modules/admin.

When I run my application in the browser I receive the following message:

Fatal error: Maximum function nesting level of '100' reached, aborting! in /var/www/ArtistCB/library/Zend/Loader/PluginLoader.php on line 141

Activity

Hide
Stefan Alexandru added a comment -

I should also mention that commenting the two lines below in the application.ini solves the problem

;resources.modules.default =
;resources.modules.admin =

This is probably because the Modules resource plugin is not runned, thus the Admin module Bootstrap class is not runned.

Show
Stefan Alexandru added a comment - I should also mention that commenting the two lines below in the application.ini solves the problem ;resources.modules.default = ;resources.modules.admin = This is probably because the Modules resource plugin is not runned, thus the Admin module Bootstrap class is not runned.
Hide
Loïc Frering added a comment -

Does your Admin_Bootstrap class extends Zend_Application_Module_Bootstrap ?

Show
Loïc Frering added a comment - Does your Admin_Bootstrap class extends Zend_Application_Module_Bootstrap ?
Hide
Stefan Alexandru added a comment -

Hi,

This is what I have in the Bootstrap.php file from the admin module.

class Admin_Bootstrap extends Zend_Application_Bootstrap_Bootstrap {}

Anyway, I am using now the latest version and the problem disappeared.

Show
Stefan Alexandru added a comment - Hi, This is what I have in the Bootstrap.php file from the admin module. class Admin_Bootstrap extends Zend_Application_Bootstrap_Bootstrap {} Anyway, I am using now the latest version and the problem disappeared.
Hide
Stefan Alexandru added a comment -

The latest version of the Zend Framework (1.9.2) that is.

Show
Stefan Alexandru added a comment - The latest version of the Zend Framework (1.9.2) that is.
Hide
Matthew Weier O'Phinney added a comment -

Marking as resolved, based on user input.

Show
Matthew Weier O'Phinney added a comment - Marking as resolved, based on user input.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: