I am developing a PHP-based CMS for use on my robotics team site. Of course, there are many other platforms, but what fun is it?
Despite all the seriousness, we get extra points for saying that we did more than create a template for Drupal or WP. It's a bit unrelated, but I would like to be able to release CMS as FOSS one day, but it definitely needs to mature and be safer. But I'm distracted.
I came to the conclusion of the development of this system, where I need a login system. This caused more frustration than I expected. I can be meticulous when it comes to security, and this is no exception. The problem is that I know how to take care of database security (trust without user input, store passwords as a hash with a random salt, etc.), but I do not have enough knowledge to create a good client-server system. A few questions in this regard: how safe is it to use session variables? How to properly implement session variables in this regard? Should a session cookie be restored every time a page is viewed? You give up more security when using cookies so that the user logs in for a while, but what are the best methods for implementing such a system?
A good tutorial on this will also help a lot.
Thank you for your time.
database php login session
Trey
source share