WordPress “Hack by DR-MTMRD” solution

A friend of mine contacted me today saying that his WordPress got hacked and it shows just this message “Hack by DR-MTMRD” on a white page. After investigating I found out that the hacker just added a blank widget with some nasty code. Solution was just to remove (delete) a widget. As simple as that. Hope that it will help someone who has this problem. Here’s the widget picture:

Hack-by- DR-MTMRD-solution

FLV streaming using Apache + WHM/cPanel

Streaming FLV files with Apache + mod_flvx has never been easier. Setup your web server to stream FLV files using Apache in just 3 minutes.

cd /usr/local/src
wget http://people.apache.org/~pquerna/modules/mod_flvx.c
apxs -cia mod_flvx.c

If your system can’t find apxs locate it using

which apxs

You’ll get something like /usr/bin/apxs as result – that’s the path to it – you need it for next step

And then use full path to apxs to compile (for example):

/usr/bin/apxs -cia mod_flvx.c

Non WHM/cPanel users
Should now add those two lines into httpd.conf:

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

and simply restart Apache using:

service httpd restart

WHM/cPanel users
Should use Include Editor since any changes made to httpd.conf will be lost in case of rebuilding apache.
So login to WHM and go to Apache Configuration -> Include Editor -> Pre Main Include -> All Versions and in the box that appears copy/paste following two lines and after saving that confirm Apache restart.

LoadModule flvx_module modules/mod_flvx.so
AddHandler flv-stream .flv

Here are a few pictures for newbies so they can find their way trough more easily:

1. Apache Configuration
2. Include Editor
apache include editor whm cpanel

3. Locate PreMain Include – select All Versions
4. Copy/paste those two lines and press Update (then confirm Apache reload)
apache include editor whm cpanel

Setting up the player
If you use JW Player (that I strongly recommend) you need to set provider to value http.
jwplayer provider http
Visit JW Player setup wizard to easily install JW Player on your site.

MP4 Streaming using Apache
To learn how to setup MP4 streaming using Apache click here

Solution for the custom fileds problem with WordPress 3.4.2

No you are not nuts there really is a problem with custom fields in WordPress 3.4.2. If you have just updated to current latest version of WordPress 3.4.2 and have found out that the custom fields are not updating and are broken – you are not alone. Its happening for everybody. Its a known bug for WordPress 3.4.2. Here we have a quick fix before WordPress 3.4.3 (or 3.5) arrives. WordPress developers are aware of the bug (http://core.trac.wordpress.org/ticket/21829). The next milestone version will be WordPress 3.5 but since this is a critical bug its already fixed in rev.21780 so it could be released early on 3.4.3 but we just don’t know when is that going to happen.

Until then you can use WordPress hotfix plugin that will take care of this bug:
http://wordpress.org/extend/plugins/hotfix/

All you need to do is install it in your WordPress. Login to wp-admin and go to Plugins -> Add New in search box enter hotfix and install the first plugin from the results list (plugin Version 0.9, plugin author: Mark Jaquith). That’s it!

Solution for yum problems on new CentOS 6 + WHM installations

Recently I discovered problems trying to install anything using yum on new servers based on CentOS 6 (64-bit) + WHM/cPanel. I was trying to install subversion using yum:

yum install subversion

And I was getting following output:

Error: Package: subversion-1.6.11-7.el6.x86_64 (base)
           Requires: perl(URI) >= 1.17
 You could try using --skip-broken to work around the problem
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
exim-4.77-1.x86_64 has missing requires of perl(SafeFile)
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0

And I would get that trying to install just about anything with yum or by calling yum check.

To solve this problem you will have to open /etc/yum.conf for editing and to locate perl* in exclude= line and remove it (just perl* part). Now install anything by running the yum install package_name it will solve all those problems that you had! Once the installation is done and problems are solved, don’t forget to put perl* back to /etc/yum.conf in exclude= list!

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.