Back Up A Large MySQL Database

Anyone that’s dealt with a Web application using a MySQL backend has probably dealt with incomplete backups. Those of you that use phpBB have almost certainly encountered this issue. Unfortunately, within phpBB and quite a few other PHP/MySQL-based applications, the backup scripts fail miserably with any reasonably large amount of data. Most of them fail because of either PHP time outs or file size limits. This article will show you two different ways to successfully back up that data. At least one of these two methods should be available in almost every remote hosting package that uses MySQL and PHP.

Check Your PHP Code For Vulnerability

I’ve been meaning to review some of my older PHP code for security vulnerabilities for a while, but never really got around to it. This afternoon, I started searching for some tools I might be able to use to do that for me. I came across the Spike PHP Security Audit Tool, and was actually fairly impressed with it.

In order to run it, I believe you need to have the PHP command-line interface installed. However, as long as you’ve got that, all you need to do is upload the package and type a simple command. It will take a while, but when it’s done, the script generates a nice HTML report showing all of the vulnerabilities it detected.

Using MySQL with PHP – Part 1

This is a very simple tutorial intended to explain how to connect to a MySQL database with PHP and how to retrieve and manipulate information from that database.

Prior Steps

Before you actually connect to a database, you need to have a database to which to connect. Further, you need to have a table inside of that database that contains information. I will write up a simple tutorial explaining how to create new databases and add information to them in another tutorial, soon.

You will also need to know the username and password for a MySQL user that has, at least, SELECT permissions on the database and you will need to know the name of the “local” MySQL host (generally “localhost,” but it will sometimes deviate to things like “MYSQLHOST” or something like that). If worse comes to worse, you can try using the IP address of your Web server, if you know it.

Additionally, you need to have PHP installed and set up with the MySQL module set up (which, if you are not setting up your own Web server, is not generally something you ever have to worry about).

Some Handy Array Functions in PHP

This post will go over the basics of some very nice array-related functions that are built in to PHP. If you use arrays fairly often in your PHP code, you will no doubt find a use for each of these handy functions over time.

A Fantastic Resource From Smashing Magazine

Earlier this week, Smashing Magazine put together a fantastic resource for PHP developers. The post is a list of “50 Extremely Useful PHP Tools.” The categories covered in the post are:

  • Debugging Tools
  • Testing and Optimization Tools
  • Documentation Tools
  • Security Tools
  • Image Manipulation and Graphs
  • PHP Code Beautifier
  • Version-Control Systems (though, according to the comments, the tools listed in this section arguably do not belong there)
  • Useful Extensions, Utilities and Classes
  • PHP Online Tools and Resources
  • In-Browser Tools (Firefox Add-Ons)
  • Frameworks for PHP
  • PHP IDEs and Editors
  • Sources and Resources

The descriptions of some of the tools in the article could have been a little better, as I don’t even understand what some of the tools are designed to do. However, there are quite a few interesting items in the list. I will definitely be trying some of them over the next few months to see how they work and what they might be able to do for me.

PHP Basics for Designers

The Atlanta Web Design Group recently held a discussion about PHP basics for web designers. Here are the slides from the presentation.

View SlideShare presentation or Upload your own.
Pages: