SEO Slug plugin breaks WordPress on PHP 7 Server

Well after a couple of years without posting on this blog, I decided to come back and start posting. Well I upgraded WordPress and then wrote a new post. Two hours later and I finally fixed a problem that kept giving a 500 error when trying to add the Post.

Now I have to post how to fix the problem. I changed a lot of settings and finally narrowed it down to the SEO-Slugs plugin that I had installed.

It all came down to this line in the plugins code:

$seo_slug_array = array_diff(
  split(" ", $seo_slug), 

Replace the “split” with “explode” and you should be set. If that’s too difficult, you can just disable the plugin.

PHPStorm Fonts in Linux

This is just a quick note as there are many suggestions online for fixing fonts in Java apps in Linux. Some require you to change some startup config options like Dawt.useSystemAAFontSettings. These are helpful, but there’s one MAJOR under-emphasized change that will help tremendously. Switch to Oracle Java. Most Linux distributions use OpenJDK by default these days. This is where my font rendering problems were. I wondered why Java seemed to suck at rendering fonts in Linux… Well this is the major culprit. Don’t ask me the specifics because I don’t have time to dig and find the root of the problem. I can just tell you that it’s a good first step to switch to Oracle Java before doing all the other things you see online to fix the problem.

LAMP Web Development Tutorials

I recently started creating a series of online courses for LAMP web development called “LAMP Web Development from the Ground Up”. These courses are available at The first one concentrates on HTML, CSS, and Javascript. It’s an introductory course. The second course is in development and will focus on Linux. If you are interested in learning how to develop web applications in a LAMP environment check it out. The first course can be found here: LAMP Web Development From the Ground Up Course 1.

Weird video issues in LinuxMint (and others) Gnome 3 + Netbeans Re-Revisited

I’ve posted about this issue on two other occasions, and I finally decided to really dive into it and find the true problem.

If you have noticed some video/graphics issues in LinuxMint or another Debian/Ubuntu based distribution along the lines of slanted tooltip fonts, random desktop environment restarts, and strange menu issues in Java apps, you may have the same problem I have been having.

My issues were a lot easier to resolve than I though they were going to be. The problem stems from an older version of the AMD/ATI video drivers that are found in the repos. If you have installed them and see these issues, then I may have the quick and easy solution for you.

This is the post on the LinuxMint forums that helped me considerably:

How to play a Bluray movie in Debian Testing

This HOWTO will probably work in Debian Squeeze, but the system I used was running Wheezy. Hopefully this HOWTO won’t be necessary long, but until then, it’s a very good way to watch blurays on your Linux system. This will also work for Mac and Windows, with some changes, but this is strictly a Debian Testing HOWTO.

There are various ways to do what we need to do. Some require you to rip the bluray first and then watch the resulting MKV. I found that this took 15 minutes or so on my 8-core system. However, there is another method which uses a program called makemkv and pipes the output to VLC using a network stream. I found this method on the web but found that some of the links were screwed up, so I couldn’t use it directly. After some searching, I found the script I was looking for and edited it slightly. For your convenience, I’m rewriting the HOWTO and including the files all here.

First of all, create a folder called makemkv in your home directory. You can use a different location if you prefer but for simplicity we’ll put it in our home directory.

mkdir ~/makemkv

Change into that directory and grab two zipped tarballs from the makemkv author. Then extract them.

cd ~/makemkv
tar xvf makemkv_v1.7.2_bin.tar.gz
tar xvf makemkv_v1.7.2_oss.tar.gz

Yes you need both the bin and the src.

Make sure you have some dependencies.

sudo apt-get install build-essential libc6-dev libssl-dev libgl1-mesa-dev libqt4-dev curl vlc

In other HOWTOs, the curl dependency isn’t mentioned. You need curl for the script we will download later.

Next compile and installed the two packages.

cd makemkv_v1.6.12_oss
make -f makefile.linux
sudo make -f makefile.linux install
cd ../makemkv_v1.6.12_bin
make -f makefile.linux
sudo make -f makefile.linux install

Finally download and run I gzipped it so the site wouldn’t complain about the file type. Just gunzip it and execute it.

It will run makemkvcon to decrypt the bluray and setup a stream on port 51000 of your computer. Then it will start vlc using the network stream. It may take a few moments to load it all.

Note that sometimes a bluray won’t play correctly even with this method or you may see a behind the scenes segment before the movie. I had this problem on my Rambo bluray.

Marte Engine TextEntity setColor()

I’ve been focusing on learning Java game development over the last couple of weeks. I’ve found that lwjgl, Slick2d, and Marte Engine are great libraries to help with the basic game functionality. In fact, they take a lot of the work out of it and leave you to focus on the game design itself. For instance, the Marte engine comes with a great resource manager class that helps keep up with images, sounds, and spritesheets for your game. Marte also has some good classes which extend Slick2D’s Entity class which can be very useful.

The one I’m going to focus on is TextEntity, which is great for adding text to the screen. However, I was unable to change the text color for the text directly using the setColor() method from the Entity class, which is inherited by TextEntity. There’s not a lot of documentation for either Slick2D or Marte, so I wasn’t exactly sure if I was missing something or if I had found a problem with the class.

Fixing the problem is rather simple. I created a new class called MyText and copied everything over from the TextEntity class. I could have extended it, but instead I wanted a new class which extends Entity directly. Then I changed the code in the render() method as such:

public void render(GameContainer container, Graphics g)	throws SlickException {
	if (font == null) {
		font = container.getDefaultFont();
	if (text != null) {
		g.drawString(text, x, y);

I then added a new constructor that takes a color as the fifth parameter:

public MyText(float x, float y, Font font, String text, Color color) {
	this.font = font;

This gave me the functionality I was after. This change basically just sets the graphics object color property to the Entity’s color property, which is exactly how I thought it should have worked to begin with.

If there’s a better way to accomplish this, let me know. I’m only intermediate with Java.

Getting rid of Hiccups

I found a secret to the universe some years ago as I discovered the secret to getting rid of hiccups. I could tell you how to do it, but I can’t. The reason I can’t tell you right now is because I’m intoxicated by Samuel Adams Boston Lager. When I’m drunk, I can’t control my hiccups. It’s the only time I can’t control my hiccups by the way. It’s a good indicator that I’ve been drinking too much. At any rate, when I’m sober, it’s easy to control my hiccups. It consists primarily with controlling my breathing. You must take deep controlled breaths and make sure that you concentrate on the exhalation of air. It has to be slow and controlled. You have to concentrate on breathing hard and holding the hiccups back. It’s hard for me to describe how it’s done at the moment because I’m drunk and unable to perform the task, but it will be something that I can talk about more in later posts. This is no old-wives-tell cure for hiccups. I can honestly stop hiccups at will.

Big Brother Google

1984 came and went, and it turned out that Orwell’s version of the future didn’t come to pass, at least on the date he foretold. Privacy is a huge issue on the internet and sometimes there’s a grey line when it comes with gathering user data. Google recently announced that it will be consolidating all the data it tracks about you across all of its products. It does this with the best intentions, both for you and for itself, but this can be a dangerous power that I’m not sure I trust Google with.

It isn’t that I have anything against Google or that I have anything to hide myself. However, Google having this amount of data can be very hazardous with our government in the state that it’s in. There’s way too many tyrannical laws being passed through Congress these days. The government has given itself way too much power and we’re just waiting around for the executive to be elected that will make full use of this power.

Google’s data collection may be great for their ad revenue plans, but the chance of the government deciding that it wants access to any or all of that data is what upsets me. Google should reconsider the amount of data it retains from it’s users. This is essential to eliminating the “big brother” factor.

Funny vWorker Job Posting

One of the most entertaining emails I received daily is the vWorkers mailer. It is a list of all the latest freelance work that is available at It’s entertaining because of some of the amazing things some people want written for peanuts. There are many foreign programmers waiting on jobs like this, and they are willing to work for near nothing. However, it still gives me a good chuckle when someone thinks they have come up with some amazing idea and just need someone to code it. Why is that funny? Because most people have good ideas, even those idiot code monkeys. The main difference is that a code monkey realizes when an idea is ridiculous.

Today’s job posting was funny for a whole new reason. The irony in this post is just amazing. Here is a screen shot of the listing. I’ve highlighted a clue to the irony. Enjoy!