ZF-7632: Bootstrapping modules leads to a infinite loop in PuginLoader class



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


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.

Does your Admin_Bootstrap class extends Zend_Application_Module_Bootstrap ?


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.

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

Marking as resolved, based on user input.