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

  • Home
  • SEARCH
  • 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 7766391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:24:16+00:00 2026-06-01T15:24:16+00:00

I want to load My ACL plugin to the application, and just start working

  • 0

I want to load My ACL plugin to the application, and just start working with ACL

I follow this tutorial to start learning ACL.

I make like this

 class My_ACL extends Zend_Acl {

public function __construct() {


    $this->addRole(new Zend_Acl_Role('member'));
    $this->addRole(new Zend_Acl_Role('admin'));

    //discussions is a module name
    $this->add(new Zend_Acl_Resource('discussions'));

    //privileges is a module name
    $this->add(new Zend_Acl_Resource('privileges'));

     //default is a the default mdule
    $this->add(new Zend_Acl_Resource('default'));


    //allow admin every thing
    $this->allow('admin');
   //tmp just for testing
      $this->allow('member');

}

and in the plugin I delete every thing and just keep an echo statement

 class Application_Plugin_Acl extends Zend_Controller_Plugin_Abstract {

private $_acl = null;

public function __construct() {
    $this->_acl = new My_ACL();
}

public function preDispatch(Zend_Controller_Request_Abstract $request) {

    $role = (Zend_Auth::getInstance()->hasIdentity()) ? 'admin' : 'member';


echo $this->_acl->isAllowed($role, $request->getModuleName() . ':' . $request->getControllerName() . ':' . $request->getActionName());

}

but when I try to access any url for the system this error occur

  Fatal error: Uncaught exception 'Zend_Acl_Exception' with message 'Resource 'default:error:error' not found' in    

  D:\ZendFramework\library\Zend\Controller\Plugin\Broker.php on line 312
  ( ! ) Zend_Acl_Exception: Resource 'default:error:error' not found in                         D:\ZendFramework\library\Zend\Acl.php on line 365

}

  • 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-06-01T15:24:18+00:00Added an answer on June 1, 2026 at 3:24 pm

    add this line

    if($request->getControllerName() == 'error')  return ;
    

    after

      $role = (Zend_Auth::getInstance()->hasIdentity()) ? 'admin' : 'member';
    

    Basically whenever application error occurs ZF changes request object to module default , error controller and its error action . For that case you have not created any resource .
    By doing what I say you will be able to see ‘Application Error’ page which will help you fix the first problem .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

at first sorry my bad English I want load model in my plugin controller
I want to load a desktop application, via reflection, as a Control inside another
I want to load some images into my application from the file system. There's
I want to load some data from mysql into my cocoa application view before
I want to load some helper in a model. How to do this? Tried
I want to load some html page see this in Flex 3.5 or more
I want to load my top-menu in a dropdown panel. I used this jquery
In my application,I want load some data to the database at the midnight each
i have code like this public class People { public string name { get;
I want to load one or more DLLs dynamically so that they run with

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.