6 Kommentare

  1. Nach der Ergänzung der application/Bootstrap.php ergibt sich bei mir ein Fehler, den ich nicht behoben kriege.

    Der Aufruf von registerPlugin(…) scheitert bei mir.

    Leicht modifiziert, um die problematische Stelle eindeutig zu identifizieren:

    protected function _initAuth() {
    $this->bootstrap(‚frontController‘);
    $auth = Zend_Auth::getInstance();
    $acl = new Plugin_Auth_Acl();

    $this->getResource(‚frontController‘);
    $plug= new Plugin_Auth_AccessControl($auth, $acl);
    $this->registerPlugin($plug);
    $this->setParam(‚auth‘, $auth);
    } // function _initAuth()

    führt bei mir zu folgendem Stacktrace:

    Fatal error: Uncaught exception ‚Zend_Application_Bootstrap_Exception‘ with message ‚Invalid method „registerPlugin“‚ in /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php:601
    Stack trace:
    #0 [internal function]: Zend_Application_Bootstrap_BootstrapAbstract->__call(‚registerPlugin‘, Array)
    #1 /daten/www/htdocs/bibotest/application/Bootstrap.php(15): Bootstrap->registerPlugin(Object(Plugin_Auth_AccessControl))
    #2 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(665): Bootstrap->_initAuth()
    #3 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(618): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource(‚auth‘)
    #4 /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php(582): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL)
    #5 /usr/share/php/libzend-framework-php/Zend/Application.php(355): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
    #6 /daten/www/htdo in /usr/share/php/libzend-framework-php/Zend/Application/Bootstrap/BootstrapAbstract.php on line 601

    Hast Du eine Idee, was da schief läuft?

    Danke und viele Grüße,
    Norbert

  2. Überprüfe mal, ob deine application.ini folgende Einträge enthält:

    includePaths.application = APPLICATION_PATH
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
    appnamespace = "Application"
    
    resources.view[] =
    resources.modules[] =
    

    Ansonsten siehts erstmal ganz gut aus. Zend ist auch korrekt eingebunden? Wenn ja in welcher Version?

  3. Hallo,

    zunächst einmal großes Lob für die Beispiele. Jedoch bekomme ich das Modul nicht ans laufen. Ist es möglich, mir den Quellcode per Email zu senden?

    Vielen Dank im Voraus.

    Gruß
    Markus

  4. @Norbert:
    protected function _initAuth() {
    $this->bootstrap(‘frontController’);
    $auth = Zend_Auth::getInstance();
    $acl = new Plugin_Auth_Acl();
    $plug= new Plugin_Auth_AccessControl($auth, $acl);
    $this->getResource(‘frontController’)
    ->registerPlugin($plug);
    ->setParam(‘auth’, $auth);
    } // function _initAuth()

Kommentar verfassen