KrnlPanic's Linux Notes and Tips

Working with linux since kernel version 2.0.30

PHPBB Moderator Queue Notifications

PHPBB3 does not have a built-in moderation queue notification capability. So, if a new user posts in a forum that requires approval, then the post will sit there in the modification queue until a moderator either sees the icon on … Read more »

Stopping bad bots using Apache Modsec

Some webcrawlers (i.e., Bots) are important to the well-being of your website. Some of these include GoogleBot, msnbot, Yahoo! Slurp, etc. There are also a lot of bots out there that do nothing to help you, and actually can harm … Read more »

Using reCAPTCHA in PHP to stop form spam

Are you tired of spambots submitting your “Contact Us” forms? Tired of spambots using your forms to “Tell a friend” with a spam link? Use Google’s reCAPTCHA service! It’s really easy to implement. Visit the google reCAPTCHA website to sign … Read more »

Auto Copyright using PHP date function

Do you own a website with a copyright tag that you’re tired of remembering to update every year? Here’s a very simple method of ensuring that your copyright is up-to-date, and you won’t have to worry about it ever again. … Read more »

MySQL rand() High CPU Usage

MySQL has been eating my server alive for the past several months, and I never could determine the exact cause. I’m running MySQL in a VPS environment with 1GB of RAM with two dedicated AMD (Opteron) CPU cores. From a … Read more »

Using ‘while’ in the bash shell

I like to use while loops to perform a command or group of commands indefinitely until I type ctrl-c to stop the loop. The while loop is useful when monitoring the output of the netstat command Alternatively, the above one-liner … Read more »

IANA IPv4 Address Space Registry

Posting this here because I like it. I use it to generate by firewall rules to block as much international traffic from my server as possible since it’s pretty clear that some Class A IP blocks don’t need to be … Read more »