PHP Frameworks make my brain hurt

I'm a big fan of Zend Framework (both 1 and 2, 3 is slated for release sometime this year I believe). Now I'll say up front, their documentation is lacking a bit, but you can work around it.

ZF2 does include a couple .sh scripts intended to be run on the project to help generate controllers and boilerplate code, but it's absolutely not required. Also, I don't recall anything that requires any shell scripts to be run on the live server, it's all for code generation on your development environment. You are using a development environment and then deploying to a live server of some kind, right? Don't just edit code straight on live.

As for login scripts, I've used a few frameworks (ZF1/2, Laravel, Lumen) and none of them really had built in login scripts, frankly I wouldn't want them to specifically because they may be using incorrect or outdated stuff like MD5 hashing for passwords. Instead they all provided form builders of some kind that let me construct a form consisting of a username and password field, run validators on them, and then get the values. You would take the value of the username field, find your user's row in the database (most likely), hash the value of the password field, and see if it matches the password field of your user's row in the database.

I'm a fan of the phpass library for password hashing and checking: https://github.com/hautelook/phpass

It's also available as a Composer package, so it's easy to install.

Remember, frameworks aren't necessarily made to do specific things for you, they're made to make doing those things much easier and more uniform. They aren't supposed to handle 100% of a login system, they handle 80% of the common boilerplate for form creation, session storage, and DB interaction. You tie those things together to create a login system.

/r/PHP Thread