Wordpress Stats Plugin is not Working or Gathering Information
WP Stats is not displaying any information for my blog!
If you are a blogger then you probably use the WordPress Stats plugin. For those who don’t, it is a plugin that gathers various statistics from hits to your blog. It gathers information on the number of page views, the most popular posts, search terms people use to find your blog, what sites send send you traffic, and lot of other great stuff.
Now imagine how lost you would be without this information. I recently ran into a situation where this was the case, and after a little research I was able to find out why WP Stats was not working on this particular blog.
I was helping a friend get their blog setup, and we ran into quiet a few issues. They were transferring an old website they barely maintained over to a blog format to make it easier to update and manage the information they already had.
During all the troubleshooting involved in switching the old site over to a blog, I noticed the WordPress Stats plugin was not gathering data. I tried several things to fix this, deactivating and restarting the plugin, re-entering the API key, checking settings in the admin panel and on WordPress.com, uninstalling and reinstalling the plugin, updating the plugin. None of this seemed to work.
Then I came across a post on the WordPress.com forums talking about this issue. Apparently on some themes there is a function that is left out of the footer that is needed for WP Stats to work correctly. If this is the case with your theme, that is probably what is causing the problem. To fix this you need to go into the “footer.php” file in your theme editor.
In the footer.php file scan to the bottom and look for the “</body>” tag [without the “ “]. Once you have found the tag you will need to insert this line of code above it:
<?php wp_footer(); ?>
Once that is done update (save) the file and then test WordPress Stats to see if it is working.
You may want to do this by logging out of your blog admin panel, and them clearing your cookies and temporary internet files. Once you have done this go back to your website and browse through a couple pages and this should generate a couple page views in WP Stats.
You need to make sure you are logged out of admin, and to clear your temp files or else your blog will not count hits from you because it will think you are the admin.
Hopefully your WP Stats plugin should be working now, and you will see your test page views showing up in the stats. If you see those page views WordPress Stats should now be working correctly.
Thanks for checking out Pseudorant. We appreciate the support!
“Database Locked” After Adept Manager Crashed
The Problem
If you have ever used the Adept package manager for Kubuntu (or other Debian based systems running KDE) you already know how valuable a tool it can be. It provides a very convenient way to install new software and keep your system updated. However, when such a convenient tool suddenly stops working, it can be very disorienting.
This is exactly what happened to me last weekend when I was trying to setup Eclipse on my PC. For those of you who haven’t heard of Eclipse, it is an Integrated Development Environment (IDE) that can be extended with plugins to support new languages, debugging tools, analytic tools, and more. I was planning on using it to manage some of the PHP projects I have been working on lately. I selected Eclipse from the Adept window and installed it, but it only came with the most common languages such as C, C++, and of course Java.
After searching online, I found out that there is an Eclipse project called PDT (PHP Development Tools) that provides exactly the functionality I am looking for, so I started to follow the instructions on the Eclipse PDT page (http://www.eclipse.org/pdt/) to install it on my PC. Since Eclipse is Java based, it needs to run on a Java Virtual Machine.
Unfortunately, the JVM that comes bundled with Kubuntu is GCJ (GNU Compiler for Java) and the Eclipse PDT instructions said that either a Sun or IBM Virtual Machine would be necessary. Luckily that is already a package in Adept, so naturally I selected it to install and clicked next to continue. This was a big mistake apparently, since I overlooked the little checkbox for “I agree”, which you need to scroll to the end of the End User License Agreement (EULA) to even see.
This caused Adept to crash, and it crashed hard. When I tried to open it again it said “Database Locked - Adept Manager” and then a short message that another process had locked the package database - even after restarting my PC. I could still open Adept, but only as read-only which makes it pretty useless.
I could go on and on about how it should have just aborted if I didn’t check the “I agree” box, instead of breaking Adept altogether - it’s not like anyone reads the EULAs anyways, but that’s a rant for another day.
After a little bit of Googling, I found a few posts on the official Ubuntu forums of others who were having similar problems, and one of them (http://ubuntuforums.org/showthread.php?t=348952) had a simple solution using only two commands…
The Solution
To fix the “Database Locked” message, you will need to open a terminal window. To do this, go to the K menu, then to the System submenu, and select Konsole - Terminal Program. Then just type the following two commands one at a time:
sudo apt-get -f install
sudo dpkg –configure -a
That’s it! The first command tries to automatically fix any broken dependancies, which for me just gave an error message. I’m not entirely sure if it is necessary but I would run it anyway. The second command tries to “reconfigure all unpacked but unconfigured Debian packages” (according to the man pages). This ran for a moment listing a bunch of packages, and when it finished I was able to run Adept once again!
I’m not sure whether the culprit for this problem was Adept or the Sun JDK package. I had read about other specific packages causing this problem with Adept, but that doesn’t tell me anything. All of the pages I came across recommended these steps or something very similar. Since this was the simplest approach and it worked like a charm, I would recommend you start with this. As always, you can search the Ubuntu forums or use Google if this doesn’t work.
AddAsPodcast Bug for Amarok on Kubuntu
Does it really have to remind me every time I move my mouse?
I recently switched to Linux from Windows XP, and I could not be happier, but getting where I am today has not been a walk in the park. A friend once told me that “Linux isn’t free, you pay for it with your time” and although that may be true to some extent, it is not as true today as it once was.
That being said, I thought that I would chronicle my experiences with Kubuntu and write an article on any inconveniences I come across as a former “Windows user”. To start things off, here is a very annoying bug between Amarok and Dolphin - a combination of two bugs.
For those of you who are not familiar with these programs, Dolphin is the file explorer for KDE that comes with Kubuntu, and Amarok is the popular media player for KDE. Apparently, developers for Amarok forgot a line in one of their .desktop files (menu/shell extensions for dolphin) which results in an error. Meanwhile, developers of Dolphin thought it would be really funny if every time you had an error message in a .desktop file it should show a popup error message to tell you about it.
Now, if you don’t do anything with .html files or xml files, then you may never see this bug, but if you do then you’ll know what I mean. Dolphin accesses the broken file every time you mouse over an html or xml file, which means just moving your mouse over a file with a .html, .htm, or .xml extension will cause a popup error message to appear. This is unbelievably frustrating if you do any kind of web development, but at least it is fairly simple to fix.
Just open Dolphin (click on the System menu next to the K menu and select any folder) and click on the shortcut on the left-hand side for “root”. Then go to /usr/share/apps/d3lphin/servicemenus and look for the file named “amarok_addaspodcast.desktop” (it will probably be the first file listed).
Right click on it and choose Actions -> “Edit as root” from the submenu. Find the line that says “Icon=amarok” and add the following line after it (without quotes):
“Exec=amarok -a %u”
Save the file and you’re all set!
If for some reason the option for “Edit as root” doesn’t appear under the Actions menu, you can go up one folder and right click on the servicemenus folder and choose Actions -> “Open as root”. Then you should be able to just open the file normally and still be able to make changes.
How to Install Firefox in Linux using Apt-Get
Installing Firefox using the Apt-Get Command
Hey all! Today we are going to cover another Linux article for beginners on how to install Firefox in Linux using the “Apt-Get” command.
When I first installed Kubuntu on my laptop I was using Konqueror to browse the net. It is a nice browser but it was giving me some trouble displaying certain menus in WordPress and on sites like Google video, etc.
I decided the best thing to do would be to install Firefox. I was familiar with Firefox from using it in Windows and I knew there was a version of Firefox for Linux. I checked on the Firefox website and there was a Linux version I could download but I didn’t know what to do with the file once I had downloaded it. We will cover that type of installation in another article.
What I ended up doing was using the “Apt-Get” command to install Firefox. I am not a big command line guy but this was actually much easier than I expected it to be.
Apt is “a Debian tool used to manage packages. When a user installs a package on a system, it also searches for and then installs or upgrades all the necessary dependant packages to make the package work. The actual command is apt-get.” -webopedia.com
This is great to know because it is saying that when you use the Apt-Get command it will also download any other files that are needed for the software to run properly.
So now that we understand what Apt-Get is and why it is useful let’s install Firefox.
The first thing you need to do is open a console window. This can be done by clicking on your K-menu:
K-Menu > System > Konsole – Terminal Program
Once the console opens you will need to type the folowing command:
sudo Apt-Get install Firefox
Once you have typed this hit “Enter” and Konsole will ask for your root password. Type in your password and hit “Enter”
You should now see some system messages in the Konsole window as the system downloads and installs Firefox onto your system. Once it is complete it will bring you back to the command line in Konsole.
Go ahead and close your Konsole window, and now you should be able to open Firefox on your system. Go to:
K-Menu > Internet > Firefox Web Browser
Congratulations. You just installed a program using the Apt-Get command.
As you can see this is a very useful command because of how easily it allows you to install applications on your system.
One thing I ran into when writing this article was that I already had Firefox installed. When I typed in:
sudo Apt-Get install Firefox
I got the error message:
sudo: Apt-Get: command not found
If you get this error message try using the following command:
sudo /usr/bin/apt-get install Firefox
I am not sure why I got the error because it originally allowed me to install Firefox using the standard Apt-Get command without the /usr/bin/.
This might be because you already have the program installed which I did in this case. If you would like to remove the program you can always type:
sudo /usr/bin/apt-get remove Firefox
This will uninstall the program you would like to remove from your system. This covers the basics of installing and removing programs using the Apt-Get command.
In future articles I will cover Apt-Get in more detail but for now this should give you enough to get started with it. If you would like to know more about Apt-Get and its usage type the following command into the Konsole:
man Apt-Get
I hope this article helped with the basics of using the Apt-Get command. In the case of the “Apt-Get: command not found” error, try the “/usr/bin/apt-get” command I listed above. This worked for me and resolved the error message.
Thanks for checking out Pseudorant. We appreciate the support!




