DROP DATABASE wordpress;

This week, I doubled back down in earnest to get my webserver running on the hardware I bought a year ago.

After  getting Apache, PHP and MySQL installed on the box and playing together nice, I installed WordPress and got it running. Then I tried backing up and restoring files from my existing server, and the server didn’t like that one bit.

Read more

A minor (but vital) Apache performance tweak

My problems seem to have become more rare since I started blocking spambots and tuned PHP and Apache but last night my server ran out of memory again and started timing out.

It turns out I still had a critical problem, but one that’s easy to fix with a relatively simple Perl script.

Read more

Tweak your PHP memory settings to fix weird WordPress issues

Over time, I’ve been experiencing weird issues with my blog. Plugins worked, then stopped working. Or they’d just run really slow. Occasionally I’d get error messages saying the plugin ran out of memory, but frequently it would just do nothing.

I found a solution inside wp-config.php. Read more

Confessions of a hacker for hire

A story on Slashdot yesterday encouraged IT departments to hire a hacker, in spite of the stigma.

I’ve been that guy, and I suspect I’ll be that guy again. I’ve also had to clean up after that guy, so I may be able to add some perspective.
Read more

How to start over with MySQL in Debian

I got my new 64-bit web server up and running today. Now the main task that remains is to get my data moved over to it. I talked myself into going with an Apache setup, since one program I want to run (Webtrees) is designed for Apache and its search engine optimization seems to work better under Apache than Nginx. It’s fast anyway; displaying the 17-person family of Andrew Davis McQueen of Leesville, Mo., briefly consumes 2% of the available CPU time in Webtrees with the APC PHP cache installed and enabled. And that should get better, seeing as newer, faster, better versions of both Apache and PHP were released in the last month.

As I built my new 64-bit web server, I messed up MySQL a couple of times. When you break MySQL beyond repair, here’s how to start over with a fresh MySQL install and a fresh /var/lib/mysql without doing a Windows-like reformat and reinstall of the entire operating system:
Read more

Handling data recovery

I took a strange phone call from the field today, asking for advice about creating policies and procedures on data recovery.

There’s no easy answer.
Read more

Upgrade update

My new fire-breathing dragon of a server is sitting idle at the moment. I would have liked to have had it up and running today, but now I’m starting to realize why it took me so long to migrate off my Pentium II-450. Setting up Linux web servers is a lot more complicated than it was in 2001.

They can do a lot more than they could in 2001 too, but when I first built that server, the process literally went in about three steps: Install Debian, apt-get install apache mysql php, then download blogging software, create a MySQL database and account for it, edit a config file, then start blogging. You could get it done in an hour, and a lot of that time was waiting for stuff to load off a CD-ROM or download over a 256K DSL connection.

Read more

I could ping my router, but not the rest of my network

I don’t know what happened, but my Ubuntu Linux server crashed hard the other night. And when I brought it back, the rest of the network couldn’t see it. I could ping my gateway (router), and the server was pulling an IP address over DHCP, and the rest of the world had connectivity to it, but I couldn’t ping anything else on the network. And my Windows machines couldn’t connect to it.

Read more

Nginx, a leaner, meaner web server

Arstechnica posted a nice writeup on Nginx, a cut-down webserver that does less than Apache does, but does the few things it does much faster. That’s nothing particularly new, as smaller and faster webservers have existed for as long as I can remember.

What makes Nginx different is that it can work with PHP. And therefore, it can run WordPress.

Read more

Awesome Ads broke my blog

So I thought I’d experiment with a plugin to help me better manage the ad blocks on my blog. The WordPress plugin Awesome Ads looked promising, so I tried it. Not only did it not work, it also threw my admin page into an endless loop of errors. This function not found in this php file. That function not found in another php file. Line 175 seemed like a problem.

Here’s how I fixed it. I won’t say it’s the right way, but it worked.

Read more