If you are talking about storing things like files etc then you could have a look at Amazon S3. If you are referring to user records etc, then use a good MVC framework (with ORM as makerops suggested).
Not sure about PHP (I develop on Ruby), but I'd definitely use an open source library to do the authentication and authorization. Too many places to be able to mess up if you do it on your own.