Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4121264
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:19:43+00:00 2026-05-20T23:19:43+00:00

Currently plugins I write seem to work or not in random ways. Some do

  • 0

Currently plugins I write seem to work or not in random ways. Some do work, some don’t, and some of them work part of the time, again with no obvious pattern. Even if all of the same are written and registered (apparently) in the same way. And I fail to find a proper documentation on where to put your plugins and how to register them in application.ini so I need to rely on examples I find in BLOGs or here. And chances are some of these examples assume things that may not be true in my code.

So I just give a simple example, and if you could suggest how to make it work, and give links to good articles on ZF plugins, I’d highly appreciate that…

Here’s how I currently do things:

Directory structure:

/library
   /Zend
   /Plugins
       Myplugin.php
/applications
    /myApp
       /configs
          application.ini
       /modules
          /default
             /controllers
             /configs
             /views, etc
          /admin
             /controllers
             /configs
             /views, etc
       Bootstrap.php
/public_html
   index.php

Myplugin.php contains one class:

Class Plugins_Myplugin extends Zend_Controller_Plugin_Abstract
{
     public function init()
     {
          print 'If I can see this, it's finally working!';
     }
}

application.ini relevant stuff looks like this:

includePaths.library = APPLICATION_PATH "/../../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
pluginpaths.plugins = "Plugins"
resources.myplugin =
resources.frontController.plugins.myplugin = Plugins_Myplugin
;//I assume Plugins_Myplugin should be resolved into library/Plugins/Myplugin.php with    class Plugins_Myplugin inside, given present configuration. Most likely I am wrong somewhere

And the most common error usually is:

Fatal error: Class ‘Plugins_Myplugin’ not found in /whatever/nevermind/domains/mydomain/library/Zend/Application/Resource/Frontcontroller.php on line 117

Sometimes it is found if I “register” it with just resources.myplugin =, omitting whole *resources.frontController.plugins.myplugin = Plugins_Myplugin* line.

So apparently this is not the right way to register your plugins. What is wrong with this way, and what would be the good way (using application.ini)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:19:44+00:00Added an answer on May 20, 2026 at 11:19 pm

    you should know that your custom namespace is “Plugins” and
    consider adding these lines to your config :

    includePaths.library = APPLICATION_PATH "/../library"
    autoloaderNamespaces[] = "Plugins"
    resources.frontController.plugins[] = "Plugins_Myplugin"
    

    and make sure to delete these :

    includePaths.library = APPLICATION_PATH "/../../library"
    pluginpaths.plugins = "Plugins"
    resources.myplugin =
    resources.frontController.plugins.myplugin = Plugins_Myplugin
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The version of Subclipse (1.2.4) currently available through Aptana's automatic Plugins Manager does not
I'd like to write a plugin that does something with the currently edited file
Currently, I don't really have a good method of debugging JavaScript in Internet Explorer and
Currently I'm doing some unit tests which are executed from bash. Unit tests are
I write code in English but I'm currently doing a site which is fully
I am currently using javax.imageio.ImageIO to write a PNG file. I would like to
I'm currently using the awesome attachment-fu plugin for a Rails app, but as a
I'm currently working on a jQuery plugin and I'm wondering if it would be
I'm using Intridea's Acts as Readable Rails plugin for a messaging system I'm currently
Currently my workflow with Emacs when I am coding in C or C++ involves

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.