rrdtool not installing on cPanel

Today I have ordered new cPanel/WHM server (CentOS 6.3) but it had problems with rrdtool and not reporting bandwidth usage. When I wanted to see the usage in cPanel I would get error saying “RRDTOOL is missing, please install rrdtool with a prefix of /usr/local/cpanel/3rdparty!“.

Goolge helped me to find me a solution – to run

/scripts/rrdtoolinstall

But that produced the error

Using catalogs: /etc/sgml/sgml-docbook-3.1-1.0-51.el6.cat
Using stylesheet: /usr/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc/local-fontconfig-devel.sgml
nsgmls:(invalid location):E: invalid filename ""
rmdir: failed to remove `devel-man': Directory not empty
gmake[2]: *** [func.refs] Error 1
gmake[2]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0/doc'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/cpanel/src/3rdparty/gpl/fontconfig-2.6.0'
gmake: *** [all] Error 2
child exited with value 2

and I would get the same thing trying to restart the cPanel service…

service cpanel restart

I was stuck with no idea how to solve this and what that gibberish code really means..
So I had to Goooooooogle some more, and I found a simple but working solution:

The solution is to run:

yum remove docbook-utils

and after that

/scripts/rrdtoolinstall

That would remove docbook that is causing problems and other command would then install it properly.
And after that rrdtool should work just fine.

How to edit .po language files in WordPress themes

If you have just bought some fancy theme and while trying to to localise run into .po, .mo, and .pot files – you will need special tool to make changes to them. This article explains how to take a .po file that is included with your WordPress theme and/or plugin download and translate it into your native language.

So what the heck are those .mo, .po, and .pot files anyhow and why are they included in my download?

Well, the files aren’t really important if English is your primary language but if you want to have WordPress, a WordPress theme, or even a plugin localized in your native language then those files are golden.

  • .mo stands for Machine Object
  • .po stands for Portable Object
  • .pot stands for Portable Object Template

The file that you want is ideally a .po file since it’s the raw editable text scraped from the entire WordPress theme/plugin. The .mo file is the compiled export of the .po file which is used by WordPress.

Here are the steps to translate/localize a .po or .pot file into another language

  • Download a gettext file editor like Poedit and install it.
  • Open the English .po file that came with your WordPress theme or plugin with poedit. If you only got a .pot, just rename it to .po and open it in poedit.
  • Now go through and translate all the text one line at a time in the bottom box.
  • Then “File” > “Save as” to your desktop or a folder on your computer. This will output both .po and .mo file.

Some text characters need to be converted into html entities otherwise they will not display correctly. A very common example is a word containing an apostrophe or single quote (‘) which needs to be replaced with ' — for example, Chloe O’Brian should be written as Chloe O'Brian. For a complete list of html entities, visit W3Schools.

You will also need to make a change to your WordPress wp-config.php file (located in your WP root directory) with the correct language codes like the example below. If you don’t have a WPLANG entry then you can create one by adding line below int your wp-config.php file. The sample below is for Brazilian language and you can find all language codes in here.

define ('WPLANG', 'pt_BR');

For more resources about how to translate WordPress into your language click here.