PHP & MySQL® Web Development All-in-One Desk Reference for Dummies®
by Janet Valade, Tricia Ballad, Bill Ballad
Chapter 4. Programming Securely in PHP
In This Chapter
Handling errors safely
Sanitizing variables
Uploading files without compromising the filesystem
Adopting just a few good programming practices can eliminate the vast majority of application security holes. Sure, some highly educated, sophisticated individuals devote themselves to breaking into applications, but your application is much more likely to be compromised by high school kids with nothing better to do. Why? Because almost all security holes in PHP Web applications are based on a few sloppy programming practices — with the majority of those failings occurring in the Big Three areas of error handling, variable sanitation, and file uploading.
In this chapter, we cover the Big Three and tell you the best methods to keep your PHP applications out of harm's way.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access