Zend Framework 1.8 tutorial 5 zend_acl with zend_auth and controller plugin part 4

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
8,794
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 27, 2009

Learn to use Zend_Acl to create application resources and allocate permissions. Then use instance of Zend_Auth to get the user's role and check it against the resource permissions. Finally, learn the basics of MVC plugins as we make sure that the security checks are run just before the controller is called in a preDispatch method.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (integral30)

  • @oldaf1 Thank you :)

    this is resolved in tutorial 9

  • Thanks for posting the videos, I've found them very very informative. I have a big project I'm working on using Zend Framework and I was wondering if there are any good books out there to learn more about the project? I've tried using ZendFramework in Action but alot of it seems outdated since newer versions of ZF have been released

  • Thats the problem with ZF. There is a number of books available on Amazon, but ZF is evolving so fast with so many changes that those books become useless in months.

    I've seen SOME books being updated to 1.8 but what good are they if 1.9 is almost out and from what i've seen even some of the tutorials will have to be redone.

    There are even talks about ZF2.

    Until ZF finds a comfort zone and stops making new version every few months, there are no book materials i can recommend.

  • hello, Have an error here. If i go to "authentication/login" i see twice the login request. Becasue preDispatch is running twice in this action.

    I see this when i complete the 6 tutorial.

    Thanks, R

  • Oh no, I can't believe i missed that. Thank you so much for pointing this out. Will get on this right away.

  • @integral30 did you sort this out? i was getting the predispatch thing twice too :-(

  • @delboy1978uk As long as you do not have any errors related to ACL this issue does not appear. There is a small discussion on my form in "Unsafe behavior with un-registered resources" thread. But you will find there is no solid answer yet.

see all

All Comments (17)

Sign In or Sign Up now to post a comment!
  • i am getting error as "Catchable fatal error: Argument 1 passed to Plugin_AccessCheck::__construc­t() must be an instance of Zend_Acl, none given, called in C:\wamp\bin\php\zend_framwork\­library\Zend\Application\Resou­rce\Frontcontroller.php on line 117 and defined in C:\workspace\Application_Libra­ry\application\plugins\AccessC­heck.php on line 8"

    Not sure what i am putting wrong .. i did exactly what you did in the tutorial. please suggest

  • There's also another error that says "Fatal error: Uncaught exception 'Zend_Acl_Exception' with message 'Resource 'error' not found' which was fixed simply by adding authentication to the list of resources. Also wondering why it doesn't happen in your setup. I'm on a WAMP environment if that makes any difference.

    Anyway, I am a complete newbie with ZF and your tutorials have quickly got me up and running. Thanks a lot for taking the time to make them!

  • I'm on 1.11.9 and I encountered a small problem when implementing this tutorial. I got an error that says "Notice: Trying to get property of non-object " and seems to refer to the $role variable. I added a conditional line that checks whether auth already has an identity before accessing the storage, and if not, to display the login page. Seems to work. But I was wondering why it didn't happen on your end.

  • @integral30 thanks for your quick reply!

    my browser wont display anything other than 'too many redirects'!

    the strange thing is that its intermittant :-s

    i was thinking, could we put some conditionals to check whether an action existed or not, because we have to register every controller and action in our acl library, which means that 404s dont work and we get the exception instead

    im new to zend framework btw however your tutoriasls are excellent so thank you very much!

    all the best!

  • Thanks a million times!

    I had played around a bit with ZF first but never got the hang of it. Now I have 1.10, and of course it's a bit different than your tutorial but it was easy to adapt and it all makes sence now! I stopped with ZF before because I didn't understand how to use ACL and AUTH inside the app.

    But now I have a fully functional authentication on my app. (Going on to the next tutorial :D)

  • Thanks alot for your reply and time.

    Can you recommend any newer books that make use of ZF 1.8 as that's the version I think I'll settle on for my project.

    Furthermore, what do you think about CakePHP or CodeIgniter as alternative MVC frameworks to ZF.

    Thanks again for your time

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more