News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Johannes Schmitt's Blog:
A New Killer Feature for Symfony2 Security
October 31, 2011 @ 14:26:08

Johannes Schmitt has a new post about his "killer feature" he's added to the security for Symfony2 framework (as a bundle) - a new customized expression-based query language that's compiled down to native PHP to make permissions checking simpler and faster.

If you have used the Symfony2 Security Component to any modest degree, you will know that we have a quite heavy voting system which uses attributes like "IS_AUTHENTICATED_FULLY" to make authorization decisions. [...] If you are concerned about performance, then you should not be all too generous with the isGranted() calls. The second option would work as well, but writing a new voter each time you need to make a new check does not really seem ideal either. Fortunately, we can do better.

He includes an example of this expression language in a direct isGranted() call, a string that checks to see if a user has three different roles, and a snippet showing the same thing in the docblock comment of a controller method. The second is a bit more complex, checking for an admin role or if the user is the one that should be deleted. You can find more doucmentation here.

0 comments voice your opinion now!
symfony2 framework security bundle expression language allow deny


Edin Kadribasic's Blog:
Serendipity on Lighty
April 21, 2007 @ 09:42:42

In a new post Edin Kadribasic shares his method for getting a Serendipity (a popular PHP-based blogging system) website up and running on a lighttpd server.

Well the basic install went pretty smoothly, but I wanted, of course, to use "friendly" URLs. For that Serendipity supplies .htaccess file with Apache mod_rewrite rules. With a little bit of effort it was possible for me to convert those into rewrite rules that lighttpd would understand.

He includes all of the rewrite rules lighttpd needs to mimic the responses of an Apache server in a rewrite-once statement, and a limitation on the files the server can send with an access-deny config line.

0 comments voice your opinion now!
serentiy lighttpd install setup rewrite deny access serentiy lighttpd install setup rewrite deny access



Community Events





Don't see your event here?
Let us know!


update interview package install language framework api tips zendserver opinion laravel symfony deployment introduction series community library list release podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework