13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

xxii<br />

Contents<br />

Firewalls 357<br />

Data Backups 358<br />

Backing Up General Files 358<br />

Backing Up <strong>and</strong> Restoring Your <strong>MySQL</strong><br />

Database 358<br />

Physical Security 359<br />

Next 359<br />

16 <strong>Web</strong> Application Security 361<br />

Strategies for Dealing with Security 361<br />

Start with the Right Mindset 362<br />

Balancing Security <strong>and</strong> Usability 362<br />

Monitoring Security 363<br />

Our Basic Approach 363<br />

Identifying the Threats We Face 363<br />

Access to or Modification of Sensitive Data 363<br />

Loss or Destruction of Data 364<br />

Denial of Service 364<br />

Malicious Code Injection 365<br />

Compromised Server 365<br />

Underst<strong>and</strong>ing Who We’re Dealing With 365<br />

Crackers 366<br />

Unwitting Users of Infected Machines 366<br />

Disgruntled Employees 366<br />

Hardware Thieves 366<br />

Ourselves 366<br />

Securing Your Code 367<br />

Filtering User Input 367<br />

Escaping Output 371<br />

Code Organization 374<br />

What Goes in Your Code 374<br />

File System Considerations 375<br />

Code Stability <strong>and</strong> Bugs 376<br />

Execution Quotes <strong>and</strong> exec 377<br />

Securing Your <strong>Web</strong> Server <strong>and</strong> <strong>PHP</strong> 378<br />

Keep Software Up-to-Date 378<br />

Browse the php.ini file 380

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!