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

Issue Type: Bug Created: 2009-08-19T05:34:22.000+0000 Last Updated: 2009-09-07T07:50:42.000+0000 Status: Resolved Fix version(s): - 1.9.2 (25/Aug/09)

Reporter: Stefan Alexandru (acid24) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: Attachments:



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 = "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


Posted by Stefan Alexandru (acid24) on 2009-08-19T05:41:51.000+0000

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.

Posted by Loïc Frering (loic.frering) on 2009-09-04T15:56:59.000+0000

Does your Admin_Bootstrap class extends Zend_Application_Module_Bootstrap ?

Posted by Stefan Alexandru (acid24) on 2009-09-06T23:47:46.000+0000


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.

Posted by Stefan Alexandru (acid24) on 2009-09-06T23:49:39.000+0000

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

Posted by Matthew Weier O'Phinney (matthew) on 2009-09-07T07:50:34.000+0000

Marking as resolved, based on user input.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.