For my own copy and paste pleasures, here are some wpdb error handling examples. It will grow over time: A very simple non-failing method for in a function: if ($wpdb->query($query) === FALSE) { return FALSE; } else { return $wpdb->get_results($query); }...
I wanted to read the timeline of the Amazon “Networking Event”. So I’ve taken the logs of the EC2 and RDS status updates and put them together for a post. If you want to learn about how to make a more...
This seems like it should be a really complicated tasks, but once you have done a few it sinks in that this is really simple… Just run each of the following 5 steps as root. Answer any questions with the...
There are LOTS of ways to do this. This is what I do so that I can use the same code in any site’s .htaccess RewriteEngine On RewriteBase / Options +FollowSymlinks RewriteCond %{HTTPS} =on RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [R=301,L] I...
If you are working with a Linux or Unix server, you may not even know which operating system release is on the server or even if it is a 32 bit or 64 bit machine. How do you even tell if...
PHP records all errors to a file named error_log I needed to look at the status of a project on two servers to see what errors were being thrown. This command line shows the top 20 errors and how often they...
Have you ever wanted to know the ip address assigned to a domain according to your local server? I had this problem. I needed to get an IP address of a domain before the domain propagated. I was writing a custom...
This summer I took the opportunity to write my first BackPress application. It was an educational experience that came with a number of surprises. I thought I would share my experience with you, along with some tips to get you out...
Though installations will vary, this is usually done via a file named timezone in the /etc directory. By default, there’s probably already a file there set to the utc timezone. So if you do a cat /etc/timezone you will see TZif2UTCTZif2UTC...
I needed to transfer about 40 databases from a new clients server over to my hosting platform. When doing a couple database exports, I might use PHPMyAdmin to do the export. Heck, it’s convenient because I usually want to look around...